Forum Discussion

S1S0's avatar
S1S0
New Member
8 years ago
Solved

TopN Values by Year

Hi, currently I am trying to build a bar chart that shows what the top 5 sellers are for each individual year. The problem is when i use the TopN filter with the bar chart I get the Top 5 sellers for...
  • v-jiascu-msft's avatar
    8 years ago

    Hi S1S0,

     

    Maybe you need a measure like this.

    ranks =
    RANKX (
        ALL ( 'DimCustomer'[CustomerLabel] ),
        CALCULATE ( SUM ( FactSales[SalesQuantity] ) )
    )

    Top_N_Values_by_Year

     

    Best Regards,

    Dale