Forum Discussion

vbis's avatar
vbis
Helper I
3 years ago
Solved

multiple if multiple conditions

Hello. I would need your help please with a bit complex multiple if statement with multiple conditions where I struggle with some issues.    This is my dax:   Rates = SWITCH(     TRUE(),    ...
  • v-yalanwu-msft's avatar
    3 years ago

    Hi, vbis ;

    The last DAX can be simplified to and could try it.

    Rates =
    IF (
        ( Clothes[Color] IN { "White", "Black" }&& [Units Sold] = "Low" )
        || Clothes[Color] = "Grey",
        SWITCH ( [Size], "Small", "5", "Medium", "10", "Large", "15" ),
        "null")
    


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.