Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

DAX: IF(OR Created Measure

Hi there.

 

I am trying to do a simple If(or( measure but have three different criteria I want to consider.  Unfortunately, I only know how to handle two conditions.

 

I need to have this be a measure because I have other measures that are dependent on it.

 

Here is what I currently have:

MoM MARA PROSP Delta Type = if([MoM MARA PROSP]>0,"Increase","Decrease")

 

But what I also need it to consider is if the [MoM MARA PROSP] value is BLANK or 0.  If [MoM MARA PROSP] value is BLANK or 0 I want it to return "New".

 

Is there anyway I can include this into my current measure?

 

 

 

Thank you,

Andrew

  • Anonymous's avatar
    Anonymous
    5 years ago


    @AW1976NOVA

    MoM MARA PROSP Delta Type = SWITCH(TRUE(),
    [MoM MARA PROSP]=BLANK(),"New",
    [MoM MARA PROSP]=0,"New"
    [MoM MARA PROSP]>0,"Increase","Decrease")

2 Replies

  • VijayP's avatar
    VijayP
    Community Champion

    Anonymous 

     

    Instead of using OR Condition you can use "||" 

    SWITCH(TRUE(),

    Something="X"||Something="Y"||Something="Z", "YEs","NO")

    Try this way

  • Anonymous's avatar
    Anonymous
    Not applicable


    @AW1976NOVA

    MoM MARA PROSP Delta Type = SWITCH(TRUE(),
    [MoM MARA PROSP]=BLANK(),"New",
    [MoM MARA PROSP]=0,"New"
    [MoM MARA PROSP]>0,"Increase","Decrease")