Frequent Visitor
Posts: 3
Registered: ‎02-18-2018

Calculating ABC over different product categories

 Hey Power BI Community! 


I'm trying to calculate ABC classification for items over different product categories. I've already solved the ABC calculation when I'm working at SKU level (Scenario 1) using this tutorial ( But there I'm mixing all the product categories and we'd like to see the ABC for each product category or even the ABC for each category and sale store. 


I'm having troubles with the DAX formulas in this case. I'd like to get the cumulated percentages, and hence, the ABC calculations by product family as in Scenario 2.


Any ideas here please? 


 ABC question.png 



Super User
Posts: 10,570
Registered: ‎07-11-2015

Re: Calculating ABC over different product categories

@realexander- I've been taking a look at this and I've been thinking about an ABC measure for quite a bit. Problem that I see is that there is no way to dynamically sort a temp table in a DAX variable that I can find. I believe this would be needed to dynamically do an ABC calculation like what you are trying to do. So, I believe at this point that you would need to create a "static" calculated table for each ABC analysis that you want to do, sort it and then put in your calculated columns. Not optimal. I've reached out to a few folks on this and will post back here if I find out some trick for this.

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!