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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
twister8889
Helper V
Helper V

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

 

Return

 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

 

Return

 IF (_Measure4 - _Measure5 < 0, 0, 

          _Measure4 - _Measure5 

)

 

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

 

 

 

1 REPLY 1
mahoneypat
Microsoft Employee
Microsoft Employee

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.

 

Regards,

Pat

 





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

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.