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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.