cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ToddMate Regular Visitor
Regular Visitor

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

Accepted Solutions
Super User
Super User

Re: How can I use an OR function

@ToddMate 

 

You can use IN operator

 

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

3 REPLIES 3
Super User
Super User

Re: How can I use an OR function

@ToddMate 

 

You can use IN operator

 

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

ToddMate Regular Visitor
Regular Visitor

Re: How can I use an OR function

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

jsh121988 Regular Visitor
Regular Visitor

Re: How can I use an OR function

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.

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 266 members 2,989 guests
Please welcome our newest community members: