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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
RustyVDN
Frequent Visitor

How to implement an OR relationship between slicers

Hi Guys,

 

I have one table in the underlying dataset. There is an item, and a location that looks like this:

 

ItemLANYID
FootballNoNoYes
Tennis BallYesYesYes
Soccer BallYesNoNo

 

I'm using Chiclet slicer, and I end up with this:

 

LA?

No  Yes

 

NY?

No  Yes

 

ID?

No  Yes

 

What is happening: 

When I combine slicers (LA = Yes; NY = Yes...) I get a list of items that show up at both places (Tennis Ball).

 

What I WANT to happen:

When I combine slicers (LA = Yes; NY = Yes...) I want a list of items that show up at either place (Tennis Ball, Soccer Ball)

 

It seems to me the logic is implementing 'AND', when I want it to implement 'OR'

 

Thanks guys!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @RustyVDN ,

 

Based on your description, you can do some steps as follows.

1. create several calculated tables unrelated to the original table.

ID = SUMMARIZE('Table','Table'[ID])
LA = SUMMARIZE('Table','Table'[LA])
NY = SUMMARIZE('Table','Table'[NY])

v-yuaj-msft_0-1614133390160.png

2. create a measure and drag it to the filter of the table visual, then select "is 1"

Measure = IF(MAX('Table'[NY]) in VALUES('NY'[NY])||MAX('Table'[LA]) in VALUES(LA[LA])||MAX('Table'[ID]) in VALUES('ID'[ID]),1,0)
v-yuaj-msft_1-1614133486182.png

3. create several Chiclet slicers.

Result: (I neither use the "ID" slicer nor add the condition of ID into the measure in the following result. You can add it. )

the measure I have modified is as follows.

 Measure = IF(MAX('Table'[NY]) in VALUES('NY'[NY])||MAX('Table'[LA]) in VALUES(LA[LA]),1,0)

022401.gif

Hope that's what you were looking for.

Best Regards,

Yuna

 

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

7 REPLIES 7
Anonymous
Not applicable

Hi @RustyVDN ,

 

In fact, you create a measure in any table is the same. You only need to drag the measure to the visual filter of your original table.

 

Best Regards,

Yuna

Hi Yuna,

 

Regarding Step 1:

I have completed this successfullly

 

Regarding Step 2:

I have complete the measure. But what table do I add the measure to?

Regarding Step 3:
I'm really not sure what you're doing here. Could you please provide further information, and elaborate further?

 

PS - Also note that when you select Yes for "NY" your filter also selects items that are No, thus not functioning correctly.

Anonymous
Not applicable

Hi @RustyVDN ,

 

Based on your description, you can do some steps as follows.

1. create several calculated tables unrelated to the original table.

ID = SUMMARIZE('Table','Table'[ID])
LA = SUMMARIZE('Table','Table'[LA])
NY = SUMMARIZE('Table','Table'[NY])

v-yuaj-msft_0-1614133390160.png

2. create a measure and drag it to the filter of the table visual, then select "is 1"

Measure = IF(MAX('Table'[NY]) in VALUES('NY'[NY])||MAX('Table'[LA]) in VALUES(LA[LA])||MAX('Table'[ID]) in VALUES('ID'[ID]),1,0)
v-yuaj-msft_1-1614133486182.png

3. create several Chiclet slicers.

Result: (I neither use the "ID" slicer nor add the condition of ID into the measure in the following result. You can add it. )

the measure I have modified is as follows.

 Measure = IF(MAX('Table'[NY]) in VALUES('NY'[NY])||MAX('Table'[LA]) in VALUES(LA[LA]),1,0)

022401.gif

Hope that's what you were looking for.

Best Regards,

Yuna

 

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

 

Hi Yuna,

 

Thanks for this. But I'm not sure I know what you mean.

1. What is a calculated table?
2. How do I create one?
3. How many do I need?
4. What does "ID= SUMMARIZE('Table','Table'[ID])" mean and what should I do with it?

 

Kind regards,

Anonymous
Not applicable

Hi @RustyVDN ,

 

Sorry, I assume you know how to create these tables. Let me explain.

Please refer to this link to know how to create a calculated table.

Using calculated tables in Power BI Desktop - Power BI | Microsoft Docs

v-yuaj-msft_0-1614919464518.png

You only need to create three tables as mentioned before because the count of your filters is 3. 

About Q4, it is in order to extract all the distinct values in the ID column and form a new independent calculated table. ("Yes" and "No") You need to disable the relationship betwwen your slicers so we have to create some independent tables to create slicers. 

You can try it according to the steps I mentioned earlier.

If you are still confused about it, please feel free to let me know. 

 

Best Regards,

Yuna

 

 

 

Hi Yuna,

 

Regarding Step 1:

I have completed this successfullly

 

Regarding Step 2:

I have complete the measure. But what table do I add the measure to?

Regarding Step 3:
I'm really not sure what you're doing here. Could you please provide further information, and elaborate further?

parry2k
Super User
Super User

@RustyVDN Actually I'm writing a blog post on a similar use case and will share once it is ready. you can subscribe to my website to get notified once this blog post is published.

 

Check my latest blog post Improve UX: Show Year in Legend When Using Time Intelligence Measures | PeryTUS IT Solutions  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!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



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.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.