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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.