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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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