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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
FelipeDBA
Frequent Visitor

Slow cumulative sum - ABC analysis

Hi, I'm struggling  with a kind of abc analysis. I have a dimesion with around 200 thousand customer and a fact table with around 20M rows. What I need is count the number of customers that represents 80% of my sells.

 

I've done the measure it is super slow and I have no idea of what to do anymore. Long story short, i've built a temp table with all the column that I need, including the Percentage of each customer in the total and it doest take more then 2 seconds to run, but when I add the cumulative sum, it goes beyond 20 seconds.. Here is my final code:

 

var v4 = 
ADDCOLUMNS(
v3
,"mysum"
SUMX(
FILTER(v3, EARLIER([% Percentage on total]) <=[%Percentage on total])
,[%Percentage on total]
)


return
SUMX(
FILTER(v4,[mysum] <=80),1
)

 

Thank you in advanced.

1 ACCEPTED SOLUTION

@FelipeDBA performance of the measure is dependent on many factors, like your data model, the relationship of the tables etc. It is not easy and straight forward answers, I have worked with tables over 100m rows and with DAX studio, I was able to tweak the measures to perform faster, in nutshell, it is not easy without looking at all the details, model and relationship and what you are trying to do. I know it is not a solution to your question, but there is no other shortcut.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@FelipeDBA , see if this can make it faster

https://finance-bi.com/power-bi-pareto-analysis/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@FelipeDBA performance of the measure is dependent on many factors, like your data model, the relationship of the tables etc. It is not easy and straight forward answers, I have worked with tables over 100m rows and with DAX studio, I was able to tweak the measures to perform faster, in nutshell, it is not easy without looking at all the details, model and relationship and what you are trying to do. I know it is not a solution to your question, but there is no other shortcut.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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