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

Running total very slow

Hi guys,

I've written che running total measure (cumulative sum) but it is very very very slow. 

Is there any way to make it faster?

 

My measure is: 

 

Orders =
VAR A = [Orders]
return CALCULATE([Orders],
FILTER(ALLSELECTED('Customers Table'[Customers]), [Orders]<= A))
3 REPLIES 3
Anonymous
Not applicable

Hi @giuliapiazza94

 

Thanks for this but...

 

1. How many customers do you actually display in the visual?

2. Why is the total of the 2nd column (and 3rd) different than the highest value in the 3rd column? To my mind, they should be the same.

3. What does the [Orders] measure look like?

4. What other filters are present?

5. What does the model look like?

 

By the way, do you know that your calculation will be incorrect if there happens to be 2 or more customers with the same amount of [Orders]?

 

Thanks.

Anonymous
Not applicable

Hhi @giuliapiazza94 

 

The description you gave won't help you (and us) much. You have to start with an explanation of what you're trying to achieve and what your measures created so far are. Also, you have to show the model. Optimizing DAX is often a quite difficult task and is highly dependent on the structure of the model.

sorry 😅

I try to explain again

 

Immagine 2021-05-18 160014.png

 

1° column = Customers

2° column = sum(orders)

3° column = cumulative sum

 

My measure works very well but it's very slow because it calculates every rows every time, so, is there a way to "take" the 2° column and to use that to calculate? 

 

I hope I've done it better 😊

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