Forum Discussion

slazarov's avatar
slazarov
New Member
10 years ago
Solved

Ranking items from multiple periods

Hello everyone,   Yet another ranking question but I seem to be stuck. Basically, I have a table consisting of a productid, year, month and sales. It looks like this:   As you can see each pr...
  • HarrisMalik's avatar
    10 years ago

    you can try two things:

     

    1. Create a calculated measure called Total Sales = Sum(Sales)

    2. For ranking Measure use following expression:

     

    Rank = RANKX(ALL(Table[ProductID],[Total Sales])

     

    this will rank Each product for each month on basis of sales. You can use the new Rank measure in your visual filters and filter on topN. I think the calculated measures cannot be used as slicers so you have to use it as filter (Please someone correct me if I am wrong)

     

    Regards

    Harris