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
Anonymous
Not applicable

Resources Exceeded and need lighter DAX measure

Hello. 

So I had this Resources Exceeded error and did google. Found out that I have to run the performance analyzer. 

So I did and check every single measure I wrote. So the result was one of my measure took almost like 30 seconds. 

I am trying to lighten this measure. but Still cant do it. Can anyone please help me lighten this measure ?

The measure that is working too slow is: 
Measure4 = SUMX(GROUPBY(Answer, Answer[CustomerID], Customer[Channel], CyclePlan[Period]),
IF([ProductType1]>=0.91 && [ProductType2]>=0.91, 1, 0))

so it uses 2 other measures. which are [ProductType1] and [ProductType2]

ProductType1 = CALCULATE([Total Completion], Answer[prodtype]="ProductType1")
ProductType2 = CALCULATE([Total Completion], Answer[prodtype]="ProductType2")

Hope I made it clear. 
Edit: 
Performance analyzer results: 
[Measure4] load duration = 30 seconds (this measure uses all 3 measures below)
[ProductType1] load duration = 6 seconds
[ProductType2] load duration = 6 seconds
[Total Completion] load duration = 12 seconds. (ProdcutType1 and ProductType2 use this measure.)
3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , _1 is new column in summarize, that we will use in sumx .

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

amitchandak
Super User
Super User

@Anonymous , Not very clear. Try like

SUMX(summarize(Answer, Answer[CustomerID], Customer[Channel], CyclePlan[Period],"_1",IF([ProductType1]>=0.91 && [ProductType2]>=0.91, 1, 0)),[_1])

Anonymous
Not applicable

@amitchandak  thank for your response. 
may I ask you what does "_1" exactly do ? wrote this measure but this can not display the visual . 

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.