Forum Discussion
Ranking items from multiple periods
- 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
Hello and thank you guys!
Using the two measures provides an awesome solution to my problem.
However, I noticed that when I add my dates in the axis the "Sort by" option from the upper right corner of the chart dissapears. The result is that the top 10 items are still displayed, however they are randomised. Is there a possible way to tacke this?
Best of all.
- Bjoern10 years agoContinued Contributor
You don't have those 2 sorting options? One is by axis (impact) and one is by measure (count of xyz).
- slazarov10 years agoNew Member
if I don't put the "Date" in the Axis I am able to sort it by sales as in the picture:
However, when I put Date in the axis (on top of ID), the sort by dissapears.
Perhaps I should create a slicer instead of having the ability to drill down. But using the slicer only displays the year not the months.
Best,
Stan
- Bjoern10 years agoContinued Contributor
Interesting, so PBI recognizes the dimension as time dimension and automatically applies a sort by the date. As far as I remember, PBI has quite a nice timeline intelligence.
You could for example use the timeline slicer (custom visual), there you switch between year/month/day:
Otherwise, you migh add a string-type timestamp instead of the date-field?