The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
for a visualization, I would like to be able to show specific values of a column when I select a specific value of another column of the same table. For instance, I have this table:
Col1 col2 col3
A X xy
A y xy
A X yy
B X xx
B y xx
B X xy
If I select A of the first column, I only want to show the values of col2 = X and col2= xy (so the first row), but not the second row, since col2 is not X and also not the third row because col3 is not xy. However, if I select B in col1, all values of col2 are allowed but only in combination with xx of col3. So the last row is not allowed.
Do I need to create calculated columns for this?
Thank you very much in advance for your help!
Solved! Go to Solution.
hi @vx99
try to add a measure like this:
Measure =
IF(
(MAX(TableName[Col1])="A"&&MAX(TableName[Col3])="xy"&&MAX(TableName[Col2])="X")
|| (MAX(TableName[Col1])="B"&&MAX(TableName[Col3])="XX"),
1, 0
)
plot a table visual with all three columns and use the measure as visual filter. Tick 1 only.
it worked like this:
Hi, there is no logic, all values are just placeholders for text values. I just want to display/filter specific text values of one column when selecting a specific value of another column.
hi @vx99
try to add a measure like this:
Measure =
IF(
(MAX(TableName[Col1])="A"&&MAX(TableName[Col3])="xy"&&MAX(TableName[Col2])="X")
|| (MAX(TableName[Col1])="B"&&MAX(TableName[Col3])="XX"),
1, 0
)
plot a table visual with all three columns and use the measure as visual filter. Tick 1 only.
it worked like this:
Perfect! That works, thank you!
Could you maybe explain why it is needed to use MAX()?
Kind regards
User | Count |
---|---|
25 | |
10 | |
8 | |
7 | |
6 |
User | Count |
---|---|
32 | |
12 | |
10 | |
10 | |
9 |