Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Switch measure value with 2 selection

I have a switch measure with below formula :  measure = SWITCH ( SELECTEDVALUE(Column1)),"Category1",[Measure1],"Category2",[Measure2],"Category3",[Measure3]...)) Now when i select Category1 an...
  • Mahesh0016's avatar
    3 years ago

    Anonymous 

     

  • Anonymous's avatar
    Anonymous
    2 years ago

    I just tried this and it's working for me:

     

    IF(AND(SELECTEDVALUE('Table1'[Column1]) = "whatever", SELECTEDVALUE('Table2'[Column2]) = "2nd whatever"), "Bring me this",

    IF(AND(SELECTEDVALUE('Table1'[Column1]) = "otherwhatever", SELECTEDVALUE('Table2'[Column2]) = "2nd otherwhatever"), "Bring me this other thing"))

     

    Seemingly you can nest it as far as you want, I'm at 2 criteria, 2 selections each for a possible combination of 4. I don't know if that's the best way to do this but I haven't been able to find any other suggestions and it is working <shrug>