Forum Discussion

William_Moreno's avatar
5 years ago

Pareto analysis

Hello people, I need help! I want to do an 80/20 analysis I made the table below with the following DAX:

 
Inventory value = sum(Inventory[Inventory ($)])
Rank =RANKX( ALL(Register[Code]), [Inventory value],, DESC )
Inventory value Acc =CALCULATE([Inventory value], TOPN([Rank], ALL(Register[Code]), [Inventory value], DESC))

 

However, when I put an attribute of the product code, the classification (rank) is lost and distorts my analysis, as follows:

How do I make an analysis correct applying  attributes  into the product code (ex.: types, family and others)?

Thanks in advanced

3 Replies

  • vanessafvg's avatar
    vanessafvg
    Community Champion
    what are you expecting to see in your results? can you please provide an example
    • William_Moreno's avatar
      William_Moreno
      Helper II

      Hello, thanks for your reply!

      I expected the ranking to remain the same, it means that the highest value keeps number 1 and not have repeated numbers.

      If you notice it ranks by the type of product, but the type is just an attribute.

      I would wish that the return it was like the table below:

      CodeRankInventory ($)Inventory ($) AccType
      749764616.885.839,976.885.839,97Raw Material
      774061823.344.454,8410.230.294,81Raw Material
      285758232.833.388,2213.063.683,03Packaging
      773891442.715.712,5315.779.395,56Raw Material
      709669252.632.064,6118.411.460,17Raw Material
      758746862.316.370,5320.727.830,70Raw Material
      219180872.171.456,0722.899.286,77Packaging
      765228382.128.575,6325.027.862,40Raw Material
      792277991.666.849,2326.694.711,63Raw Material
      7322027101.653.872,9428.348.584,57Raw Material
      7007089111.580.017,9229.928.602,49Raw Material
      2956524121.284.415,5631.213.018,05Packaging
      • vanessafvg's avatar
        vanessafvg
        Community Champion

        try this

         

        Rank =
        CALCULATE (
        RANKX ( ALLSELECTED ( Register[Code] ), CALCULATE ( [Inventory value] ) ),
        ALLEXCEPT ( Register, Register[Code] )
        )