Forum Discussion

ToddMate's avatar
ToddMate
Helper II
7 years ago
Solved

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.

3 Replies

    • ToddMate's avatar
      ToddMate
      Helper II

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

  • jsh121988's avatar
    jsh121988
    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.