Forum Discussion

Infidti's avatar
Infidti
Frequent Visitor
3 years ago

SWITCH(SELECTEDVALUE

I am creating a grouping for my measures to show them in a different way like in excel for a table visual.

 

Currently it times out as I believe it's to big, is there anyway I can optimize the following:

 

SWITCH(SELECTEDVALUE('measure group'[measure name]),

"Name",[measure1],0)

 

There are 170 measures in this calculation I have only put one for the example. So will go up to measure170

1 Reply

  • Hello Infidti , If multiple measures take similar value then create using OR statement to reduce number of iterations. For example 
    Switch(Selected Value(Measures),

    "Name1"||"Name2"||"Name3", Measure1,.....

     

     

    If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!