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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors