Forum Discussion

HitcH's avatar
HitcH
Helper II
3 years ago
Solved

Rank not working

Hello Power BI people

I want to see the rank of my products, based on sales, but I get some multiple ranks:

As you can see RANKkK is showing 6 rank 1 and 3 rank 5. This is the formula that I'm using:

RANKkK = RANKX(ALL(Controlling), [Somma fatt.], ,DESC)
 
Can you help me finding out the error?
 
Thanks a lot in advance!!

 

  • Auto - Solved

    The correct formula:

    RANKkK = RANKX(ALL(Controlling[VIB]), CALCULATE(sum(Controlling[Fatt. lordo])), ,DESC)

4 Replies

  • Hi HitcH ,
    You try this type of calculation :-
    For example

    Ranking on Brand :=
    IF (
        ISINSCOPE ( 'Product'[Brand] ),
        RANKX (
            ALLSELECTED ( 'Product'[Brand] ),
            [Sales Amount]
        )
    )Thanks ,
    Pratyasha Samal
    Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
    If you found this post helpful, please give Kudos C
    • HitcH's avatar
      HitcH
      Helper II

      Hi Pratyasha 

      My intention would be to have the complete rank, without differenciation per brand or whatever. Do you know why my formula is not working?

       

      Thanks in advance!

  • Auto - Solved

    The correct formula:

    RANKkK = RANKX(ALL(Controlling[VIB]), CALCULATE(sum(Controlling[Fatt. lordo])), ,DESC)