Forum Discussion
Top 15 in a report
- 10 years ago
I use the Rank X measure for my products in the filter area of the visual (or whole page as needed). Then, when I add other values, there is nothing to break. I don't put the Rank X in the visual, I just use it as a filter for the page/report. In fact, I usually fill in all other information then apply it last to pull up my top 25.
Add the RankX measure to your data set. For my RankX I chose to Rank my sales performance based upon the YOY dollar variance using: Rank Top $ Variance TotalSales = RANKX(ALL(SalesPerformance[MfgName]),[$ Variance TotalSales]) This is my measure using my data measure and column names. this returns a value as for where the manufacture falls in the list of all manufacturers. For example, our top performer is 1. Our worst performer is 504 or such.
When I create my report, I add in the information that I want to see without the RankX measure. Then, when the report is ready, I drag my RankX measure into th report filter area. Since i want the top 25 performers, I choose the value to be "less than" and fill in 26 and apply. This reduces the report down to the top 25 performers and is done completely by stand alone measures and built in filter systems.
Please note that I have shared my actual measure specific to my data. You may need to make changes in order to use it for your report.
Thanks for the TopN explanation using RankX, this worked well for me. I’m trying to create a table that dynamically selects the Top 5 states by N count but then puts the remaining 45 states into an ‘Other’ category. Any idea how to do this? Thanks!
State | N |
FL | 370 |
CA | 173 |
NY | 122 |
NJ | 90 |
IL | 89 |
Other | 1093 |