Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Infidti
Frequent Visitor

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 1
Kishore_KVN
Super User
Super User

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!!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.