Forum Discussion

NPArulventhan's avatar
NPArulventhan
New Member
10 years ago
Solved

How to get Top 10 Values. Help me,

How can i get the Top 10 customer sales.

  • Hi Arul,

     

    1. First u need to create one measure 

    Sum of sales = SUM(Sales)

     

    2. Second for Rank

    Rank = RANKX(Allselected(Customer),"Sum of Sales",,Desc,Dense)

     

    3. Apply this rank in Visual Filter from that u can choose Top N Values

     

    Hope it will solve your prob 

3 Replies

  • Baskar's avatar
    Baskar
    Resident Rockstar

    Hi Arul,

     

    1. First u need to create one measure 

    Sum of sales = SUM(Sales)

     

    2. Second for Rank

    Rank = RANKX(Allselected(Customer),"Sum of Sales",,Desc,Dense)

     

    3. Apply this rank in Visual Filter from that u can choose Top N Values

     

    Hope it will solve your prob 

    • NPArulventhan's avatar
      NPArulventhan
      New Member

      great!!!!!!!!!

                 Its help me to choose Top N Values

    • Balarajah's avatar
      Balarajah
      New Member

       

      I am new to the Power BI

      It works well, but my total value is wrong. Its  shwing total value for the entire month.

      I want total value for top 10 customer. 

       

      How can i add top 10 sales values.  I have used below formula . Still it's not working

       

      Top 10 Turnover = if (ISFILTERED(V_Sale_TurnOver_BI[CustomerName]), if([Rank]<=10, sum(V_Sale_TurnOver_BI[Turnover]),BLANK()), CALCULATE(SUM(V_Sale_TurnOver_BI[Turnover]),TOPN(10,VALUES(V_Sale_TurnOver_BI[CustomerName]),sum((V_Sale_TurnOver_BI[Turnover]) ) ) ))

       

      Please advise