Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
vx99
Frequent Visitor

show specific values of a column when selecting a specific value of another column of the same table

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!

1 ACCEPTED 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. 

FreemanZ_0-1674178077024.png

 

it worked like this:

FreemanZ_1-1674178105036.png

 

FreemanZ_2-1674178116878.png

FreemanZ_3-1674178145258.png

 

View solution in original post

4 REPLIES 4
FreemanZ
Super User
Super User

hi @vx99 

A - X -xy, B - - xx, what is the logic behind?

vx99
Frequent Visitor

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. 

FreemanZ_0-1674178077024.png

 

it worked like this:

FreemanZ_1-1674178105036.png

 

FreemanZ_2-1674178116878.png

FreemanZ_3-1674178145258.png

 

vx99
Frequent Visitor

Perfect! That works, thank you!

 

Could you maybe explain why it is needed to use MAX()?

 

Kind regards

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.