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
okusai3000
Helper IV
Helper IV

Ultra Slow Measure and not enough Resources (Summarize)

Hi everyone,

 

I have made an Stocks Report using as example Source CSVs. It works OK, giving me all what I need, but indeed it's a bit slow.

 

The main problem is that once I migrated this report to my CUBE in SSAS, well, things have gotten even worse, with warnings about that my Azure doesnt have enough resources, and asking me to upgrade. The thing is that actually I did it, and still in some cases is claiming for even more resources (for instance when I filter more months for some calculations). So it's clear that its a DAX issue I think.

 

Heres the error:

 

Captura de pantalla 2020-12-04 a las 18.09.13.png

(Not enough resources, consider to use filters and reduce data)

 

 

So, I believe that the main responsable here is this measure:

 

*Cant Equipos =
VAR __table = CALCULATETABLE(SUMMARIZE('Fact Stock Equipos',[esap_cod],"ultimo_mov",CALCULATE([*Ultimo Mov],all('Fact Stock Equipos'[aprt_estado]))),filter(values('Fact Stock Equipos'[esap_cod]),[*Filtro Ultimo Estado]=1))
RETURN

COUNTX(__table,[ultimo_mov])
 
It counts the last movement of each article in our stock.
 
And uses this other measures also:
*Ultimo Mov =
VAR CurrentDate = (max('Dim Date'[Date]))
VAR Results =
CALCULATE(LASTDATE('Fact Stock Equipos'[fecha]),
filter(all('Dim Date'),
('Dim Date'[Date] <= CurrentDate)),all('Dim Tipos de Estado'),USERELATIONSHIP('Dim Date'[Date],'Fact Stock Equipos'[fecha]))
RETURN
Results
 
*Filtro Ultimo Estado = IF([*Ultimo Estado]=SELECTEDVALUE('Dim Tipos de Estado'[cod_estado]),1,0)
 
*Ultimo Estado =
VAR CurrentDate = (max('Dim Date'[Date]))

VAR Results =
CALCULATE(LASTNONBLANKVALUE('Dim Date'[Date],max('Fact Stock Equipos'[aprt_estado])),
filter(all('Dim Date'),
('Dim Date'[Date] <= CurrentDate)),all('Dim Tipos de Estado'),USERELATIONSHIP('Dim Date'[Date],'Fact Stock Equipos'[fecha]))
RETURN
Results
 
And this is the model:
 
Captura de pantalla 2020-12-04 a las 18.05.36.png
 
 
Any ideas of what I should do?
 
Thanks a lot!
1 REPLY 1
v-jayw-msft
Community Support
Community Support

Hi @okusai3000 ,

 

Power BI has requirements for hardware. If your dataset is large, the hardware requirements for data processing will be higher.You could open the Resource Monitor to check the resource usage while using Power BI.

In addition, you could try to optimize the measure, such as modify

measure = calculate([aaa],filter(table,conditions))

to

measure = 
var table1 = filter(table,conditions)
return
calculate([aaa],table1)

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find 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.