Forum Discussion
Anonymous
6 years agoNot applicable
Problem with Pareto
Hey guys - I kindly ask for your advice. These two charts are my pareto calculation: pareto = var total = calculate(COUNT('Stammdaten Komplett'[ID] ); ALLSELECTED('Stammdaten Komplet...
- Anonymous6 years agoI don't quite get the code you've written but I'll tell you what you have to do. For each and every item on your x-axis you have to calculate the cumulative sum of all the items that precede the item in terms of the measure and then find all the items that have exactly the same value of the measure as the current item. Then among all the items with the same value you have to only sum up those that precede the current item plus the current item. This time the order will be not by the measure value (as they all have the same value) but by the order of the items (I guess it'll be alphabetical). This is how you properly build the pareto line.
amitchandak
Super User
6 years agoAnonymous , for same number you need to add a very small random number .
refer this approach or break tie in rank
https://databear.com/how-to-use-the-dax-rankx-function-in-power-bi/
- Anonymous6 years agoNot applicableRANX pareto =RANKX('Stammdaten Komplett';'Stammdaten Komplett'[pareto SAP];;DESC)
I am sorry - I do not understand.
or must I integret in this measure:pareto SAP = var total = calculate(COUNT('Stammdaten Komplett'[ID] ); ALLSELECTED('Stammdaten Komplett'))var currentnumber = count('Stammdaten Komplett'[ID])var summarizetable= SUMMARIZE(ALLSELECTED('Stammdaten Komplett');'Stammdaten Komplett'[SAPPartNumber]; "Revenue"; COUNT('Stammdaten Komplett'[ID]))var cumulativesum = SUMX(filter(summarizetable; currentnumber <=[Revenue]);[revenue])return cumulativesum/total*100