Forum Discussion

PGAT's avatar
PGAT
Icon for Helper III rankHelper III
5 years ago
Solved

Top N for each month

  Hi PBI Community,  I have been using Top N for a while but yet today, I am stumped.  I have a report of our invoices which are issued by a team of many pple (e.g. Member 1, 2, 3, 4, 5 and so forth...
  • v-robertq-msft's avatar
    5 years ago

    Hi, PGAT 

    According to your description and expected result, you can follow my steps:

    1. Create these measures:
    Rank =
    
    RANKX(
    
        FILTER(ALLSELECTED('Table'),
    
        [Year Month]=MAX([Year Month])),
    
        CALCULATE(MAX([Billing])),,
    
    DESC)

     

    No1 =
    
    CALCULATE(MAX([Member]),FILTER('Table',[Rank]=1))

     

    No2 =
    
    CALCULATE(MAX([Member]),FILTER('Table',[Rank]=2))

     

    No3 =
    
    CALCULATE(MAX([Member]),FILTER('Table',[Rank]=3))

     

    No4 =
    
    CALCULATE(MAX([Member]),FILTER('Table',[Rank]=4))

     

    No5 =
    
    CALCULATE(MAX([Member]),FILTER('Table',[Rank]=5))
    1. Create a Matrix chart, and place columns like this:

     

    And you can get what you want.

    You can download my test pbix file here

     

     

    Best Regards,

    Community Support Team _Robert Qin

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.