Forum Discussion
RANK and TOPN (plus additional items)
Hello Community:
I am working with some weekly sales data that we are ranking and slicing based on a TopN slicer. I am trying to figure out two main things:
1. Can we create a measure that ranks the Brands based on the most recent week ending date? So if we were looking at all the data, rather than SUMMING all the sales and ranking the total, I only want to sum the sales of the most recent week and rank based off of that.
2. With those rankings, are we able to slice based on TopN but also include other Brands as well. For example I want to look at the Top 10 brands, but I also want to see Brand 1 and Brand 5 no matter where they rank (even if outside the TopN selection).
I am pretty sure #1 is possible but I am not sure about #2.
Your help is always appreciated!
Thank You!
Ryan
2 Replies
- amitchandak
Super User
ryan_b_fiting , refer my article, how to get a recent week and try to have a rank on that
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415 - AnonymousNot applicable