Showing results for 
Search instead for 
Did you mean: 
Helper IV
Helper IV

Slow Dax Measure is there anyway to increase the performance

Hi guys,


I have the measure:


var _measure1 = Measure1

var _measure2 = Measure2

var _measure3 = Measure3



 IF (_Measure1 > _Measure2, 2, 

          IF( _Measure1 > _Measure3, 1, 0 ))

I have a performance problem here, and I already tried the calculate with filter, but the problem is, that _Measure2 and _Measure3 are created by other multiples measures, and the filter in the CALCULATE function is just for one column. Does someone have one suggestion about this?


other measure is:

var _measure4 = Measure4

var _measure5 = Measure5



 IF (_Measure4 - _Measure5 < 0, 0, 

          _Measure4 - _Measure5 



The same here, the _Measure4 and _Measure5 are created by other measures.




Super User IV
Super User IV

The performance of your overall measure is driven by the performance of those individual measures, so it is hard to troubleshoot without seeing those expression.  One small thing you can do on the second one is to store _Measure4 - _Measure5 in a variable and using the variable in both terms of the IF().  You can also return each measure separately in your return to troubleshoot which one is taking longest.





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.

@mahoneypa HoosierBI on YouTube

Helpful resources



We are excited to announce the Power BI Super Users!

Wave Release 2

Check out the updates in Power BI.

Overview of Power BI 2020 release wave 2!

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!


The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.