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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bookhouseboy
Helper I
Helper I

Interactive filters across multiple variables

Hi,

I apologize if this turns out be super banal; I'm still fairly new to Power BI. I tried to google this, but it's hard to put the problem into a pithy phrase.

I want to create an interactive report on the ratings of individual scenes of a TV show based on which character is in a scene. So my source data looks like this:
Clipboard01.jpg

It's easy enough to slice the data for, say, the character of Clara alone. But I want to give people the option of clicking on "Clara" and "Bob" and then only be shown scenes Clara shared with Bob (i.e. scenes 1 and 4).

There are 28 characters, by the way, so solutions including 28 individual slicer visuals (if they exist) would not be practical.

How do I do this? Is there a way? 

Thanks!

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

Hi, @bookhouseboy ;

You could unpivot columns expect [SceneNo] column. 

1.unpivot it 

vyalanwumsft_0-1634534847505.png

2.create a slicer table.

slicer = SUMMARIZE('Table',[Attribute])

3.create a flag measure.

flag = 
var _sli=SUMMARIZE('slicer',[Attribute])
var _tab=SUMMARIZE(FILTER(ALL('Table'),[Attribute] in _sli&& [Value] ="NO"),[SceneNo])
return IF(ISFILTERED(slicer[Attribute]),IF(MAX([SceneNo]) in _tab,0,1),1)

4.then creata a matrix then apply flag is "1" into visual.

vyalanwumsft_1-1634534970099.png

The final output is shown below:

vyalanwumsft_2-1634535000391.png

Best Regards,
Community Support Team_ Yalan Wu
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-yalanwu-msft
Community Support
Community Support

Hi, @bookhouseboy ;

You could unpivot columns expect [SceneNo] column. 

1.unpivot it 

vyalanwumsft_0-1634534847505.png

2.create a slicer table.

slicer = SUMMARIZE('Table',[Attribute])

3.create a flag measure.

flag = 
var _sli=SUMMARIZE('slicer',[Attribute])
var _tab=SUMMARIZE(FILTER(ALL('Table'),[Attribute] in _sli&& [Value] ="NO"),[SceneNo])
return IF(ISFILTERED(slicer[Attribute]),IF(MAX([SceneNo]) in _tab,0,1),1)

4.then creata a matrix then apply flag is "1" into visual.

vyalanwumsft_1-1634534970099.png

The final output is shown below:

vyalanwumsft_2-1634535000391.png

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@bookhouseboy , I think it better to unpivot all these columns as row values and then create a slicer (multiple value slicer )

https://radacad.com/pivot-and-unpivot-with-power-bi

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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