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
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

@ToddMate 

 

You can use IN operator

 

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


Regards
Zubair

Please try my custom visuals

View solution in original post

3 REPLIES 3
jsh121988
Employee
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"}


Regards
Zubair

Please try my custom visuals

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

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.

Top Solution Authors