Forum Discussion
Flori_Abb
9 years agoHelper I
DAX Switch function with two variables
Dear all just to collect some thoughts if that is a good way or if this formula will slow down my pbi report in future... I have two calculated values (Revenue/Units) and a calculated average ...
v-huizhn-msft
9 years agoMicrosoft Employee
Hi Flori_Abb,
From what I know, your formulas are nice, it's normal to run lower after you add more variables. I will post the update when I find more efficient way.
Best Regards,
Angelia
- Phil_Seamark9 years agoMicrosoft Employee
Hi Flori_Abb
Not so much a performance tip, but I'd recommend using the DIVIDE function for your division maths.
so rather than
z = x / y
use
z = DIVIDE(x,y,0)
In terms of performance, can you preaggregate or precalculate some of your data upstream of Power BI? eg in the Query Editor or in your data source?