Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

IF STATEMENT USING SELECTED VALUE

Hi Guys,   Newbie here,   I would like to know if is it possible to use SELECTEDVALUE function in an IF STATEMENT as a measure.   For Example. I want to use different MEASURE depending on the ...
  • PaulOlding's avatar
    4 years ago

    Hi Anonymous 

    Yes, you can do that.  You'll probably want to use SWITCH though, to avoid lots of nested IFs.

    Something like

    Selected Measure = 
    SWITCH(
        SELECTEDVALUE(Table[Slicer Column]),
        "Slicer Value 1", [Measure 1],
        "Slicer Value 2", [Measure 2],
        ..... etc
        )