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
Anonymous
Not applicable

filtering table based on dynamic slicer

Hi,

I have a table like this :

ID        A flag      B flag      C flag      D flag

1             1             1            0               1

2             0             1            0               0

3             0             1            1               1

4             1             0            1               0

5             1             0            0               0

 

and a slicer looks like this (slicer values are text) :

☒       A

☐       B

☐       C

☐       D

 

If I select A from the slicer, I would like to filter and show only the rows where A flag = 1

How do I do that ?

Thanks

Ilky

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , One way is you unpivot this data and then use flag as slicer filer and value 1,0 as filter clause

 

countrows(filter(Table, Table[Value]=1))

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

 

Another option would be Bookmarks, 4 buttons for A,B, C,D

 

And use filter and column based on that https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive

Anonymous
Not applicable

Hi @amitchandak 

The slicer dynamicly controls the values displayed in the other visuals as well. 

ilky_0-1610592248373.png

 

ilky_1-1610592298791.png

So I cannot have it as bookmarks. All I want is to filter the table under the graph based on the category selected. The table has  flags to say which row belongs to which categories. Am I clear of what I am after ?

@Anonymous , I think unpivot is the best option you can use

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

 

or may have some direct query table and see if this can work

https://datamonkeysite.com/2020/10/22/change-dimension-dynamically-using-parameter-in-powerbi/

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.