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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

Values in table visual

Please help. I have an excel with different fruits and columns with the questions regarding this fruit. All questions are the same for each fruit. For example, is it sweat, is it red and is it black? I have only YES or NO answers in each column. I would like to create a slicer, on which I will choose the needed fruit and on the same page there will be a table with three questions about the fruit. It would be perfect if I can click on fruit at the slicer and see only NO values in the table. For example, I choose an apple and I see that the "is it black" value is NO. All other questions with YES answers may not appear. Then, I click on a banana at the slicer and see the "is it red" value is NO. Thank you for your help.

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @Anonymous ,

I created some data:

vyangliumsft_0-1658120869978.png

Here are the steps you can follow:

1. Create measure.

Flag =
var _select=SELECTEDVALUE('Table'[fruits])
var _No=CALCULATE(MAX('Table'[YES/NO]),FILTER(ALL('Table'),'Table'[fruits]=_select&&'Table'[Color]=MAX('Table'[Color])))
return
IF(
    _No="Yes",0,1)

2. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_1-1658120869979.png

3. Result:

vyangliumsft_2-1658120869979.png

If you need pbix, please click here.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @Anonymous ,

I created some data:

vyangliumsft_0-1658120869978.png

Here are the steps you can follow:

1. Create measure.

Flag =
var _select=SELECTEDVALUE('Table'[fruits])
var _No=CALCULATE(MAX('Table'[YES/NO]),FILTER(ALL('Table'),'Table'[fruits]=_select&&'Table'[Color]=MAX('Table'[Color])))
return
IF(
    _No="Yes",0,1)

2. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_1-1658120869979.png

3. Result:

vyangliumsft_2-1658120869979.png

If you need pbix, please click here.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

ddpl
Solution Sage
Solution Sage

@Anonymous 

 

Create 3 measures as shown below...

 

Sweet = SWITCH(TRUE(), MAX(Fruit[is it Sweet?]) = "YES", "-", MAX(Fruit[is it Sweet?]))
RED = SWITCH(TRUE(), MAX(Fruit[is it RED?]) = "YES", "-", MAX(Fruit[is it RED?]))
BLACK = SWITCH(TRUE(), MAX(Fruit[is it BLACK?]) = "YES", "-", MAX(Fruit[is it BLACK?]))
 
and put them into table with(make sure to turn off Totals in Format Visual pane) or without column of fruit names,
then you can slice through fruit name and you got what you asked for.
 
Hope it will work for you.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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