Forum Discussion
Marcox28
3 years agoHelper II
Optimize formula Calculated column
Hi Guys, in one of my model I have this computed column. How can I optimize the code to improve performance? CalculateColumn = IF(SEARCH("[CT]",'FactTable'[Code],1,0 )>0,"GPS", IF(SEARCH("[CA]"...
amitchandak
3 years agoSuper User
Marcox28 , You switch and Use OR
example
Switch(True(),
containsstraing('FactTable'[Code],"[CT]") || containsstraing('FactTable'[Code],"[CA]" ),"GPS",
//Add others
)
Switch-Case statement of #PowerBI: https://www.youtube.com/watch?v=gelJWktlR80&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=56
CONTAINSSTRING and CONTAINSSTRINGEXACT: https://www.youtube.com/watch?v=XbgLGDvWdWQ&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=44