Forum Discussion
fjjpeeters1976
1 year agoHelper III
SWITCH vs IF (increase performance?)
I have the following SWITCH calculation and for items 1-20 there is quite a heavy calculation logic behind it. When implementing this statement the refresh became extremely slow. Chat GPT is sayin...
- 1 year ago
Hi fjjpeeters1976 ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Thank you.
- 1 year ago
hi, thanks very much for your help. It made it indeed faster. Still it is rather slow but I think that is more due to the size of the report and the complicated formulars behind it. I will focus more on those now.
MasonMA
1 year agoSuper User
Well switching to nested IF will make your code unreadable for sure with more than 3 nested conditions:). I think your code looks clean and neat with SWITCH!
In terms of performance, i'm thinking it's more related to the Measures inside your SWITCH if they are CALCULATE with heavy filters or complex iterators like SUMX, FILTER.
Hope this helps:)