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

OR condition on multiple slicer selections

I have a streaming dataset dashboard that 6 slicers currently available for a table of data.

The 6 slicers each represent a different column in the table but I need them to act as OR's and not AND's when selected.

I am stumped on how to achieve this.

 

 

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

Hi, @Anonymous ;

I made a simple document to illustrate it.

1.The first step is to have 6 tables independent of each other, without any relationship (my file here is using two slicers, so two tables)

vyalanwumsft_0-1641801209310.png

2.Then create a measure.

flag = IF(MAX('Table'[column1]) in ALLSELECTED(slicer1[column1])||MAX('Table'[column2]) in ALLSELECTED(slicer2[column2]),1,0)

3.apply the flag measure into filter.

vyalanwumsft_1-1641801285356.png

The final output is shown below:

vyalanwumsft_2-1641801332130.pngvyalanwumsft_3-1641801378575.png

If you also not clear, can you share me the simplr file after removing the sensitive information?

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

5 REPLIES 5
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

I made a simple document to illustrate it.

1.The first step is to have 6 tables independent of each other, without any relationship (my file here is using two slicers, so two tables)

vyalanwumsft_0-1641801209310.png

2.Then create a measure.

flag = IF(MAX('Table'[column1]) in ALLSELECTED(slicer1[column1])||MAX('Table'[column2]) in ALLSELECTED(slicer2[column2]),1,0)

3.apply the flag measure into filter.

vyalanwumsft_1-1641801285356.png

The final output is shown below:

vyalanwumsft_2-1641801332130.pngvyalanwumsft_3-1641801378575.png

If you also not clear, can you share me the simplr file after removing the sensitive information?

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.

Hello @v-yalanwu-msft , 
amazing solution ! Bravo

Do you know a way to do it without create multiple table each table for slicer ? 
Or maybe create table in dax and use it in the same flag measure ? 
Best regards 

I have the same problem where I want to have 3 slicers act as OR filters on my visual. I tried to use your solution but it doesn't quite work. If you select no filter in one of my 3 slicers, then the data doesn't get filtered at all. It seems to be the same case with your example data:

aallman_1-1669152189846.png

 

how can I get this to work so that no selection in one of the slicers will cause the data to filter only by actual selections?

 

parry2k
Super User
Super User

@Anonymous you have to use disconnected tables for your slicers and then write measure to filter based on the selection, reason you want disconnected table because it will not filter your transaction table, and will only get filtered thru using measure which then you can control.

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

 

Learn about conditional formatting at Microsoft Reactor

My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

I am new to this so I am not familiar with disconnected tables. How do I go about doing this? The option for creating a new table under modeling is greyed out which I assume is because I am using a streaming dataset?

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.