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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
ToddMate
Helper II
Helper II

How can I use an OR function

 

Hi,
 
As a newbie the most simple thing is tripping me up.
 
Can you please advise how to add an OR into this statment.  It works perfectly up to the "X".
 
Measure = CALCULATE(sum(SIOs[EventValue]), FILTER(SIOs,[Month Ending]<MAX(SIOs[Month Ending])),FILTER(SIOs,[Product] = "X" OR "Y"))
 
I have tried || and nothing seems to work. 
 
Thanks in advance.
1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

3 REPLIES 3
jsh121988
Microsoft Employee
Microsoft Employee

I'd like to add that you need to specify the column again in an OR statement.

[Product] = "X" || [Product] ="Y" instead of [Product] = "X" || "Y".

'IN' works in the solution because it's a single column.

Zubair_Muhammad
Community Champion
Community Champion

@ToddMate 

 

You can use IN operator

 

[Product] IN {"X" , "Y"}

Brilliant ... Thank you so much .. i tried this but used ( instead of { ... 

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

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

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.