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
shrimankabra
Frequent Visitor

Alternate solution to DAX

Hi All,

I have written a dax function as shown below.Capture.PNG

It works completely fine and give solution I require, the only problem is it take too much time to execute which decreases the performance of the report. I have been noticing this issue since I have added 'IF' condition as shown above.

Is there any alternative in this dax so that is take lesser time to execute than usual?

 

Note :- I can't replace "ALL(PATIENT_JOURNEY_2), VALUES(PATIENT_JOURNEY2_2[OPERATION]), VALUES(DIM_REGION[REGION])...." with ALLEXCEPT because ALLEXCEPT does not accept all columns from the table as an arguments and my dim tables have single columns.

 

Thanks in advance!

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @shrimankabra ,

According to your formula, it seems like you invoke many related tables as filter conditions.
When formula calculated on visuals, it will loop calculation on each row contents and affect performance.

Optimizing DAX expressions involving multiple measures

Optimizing nested iterators in DAX

You can consider to add a ranking column to data table instead cache these calculation in measure variables.

Regards,

XIaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi,

Thanks for the suggestion, but there's a problem with it, adding ranks to column would make it static and won't change dynamically when I apply slicer filters to it.

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.