Forum Discussion
Rank filtered values
If you want both top and Botton together then it bit tricky. Otherwise, have rank (Asc and desc two measures) and use it has a visual level filter
In case you want both then have like this
ValForChart = CALCULATE(SUM(IPBI[Value]);ALL('Period Map'[FY]))
rank asc = ranks(all(IPBI),[ValForChart],,asc,dense)
rank desc = ranks(all(IPBI),[ValForChart],,desc,dense)
ValForChart Ranked = calculate([ValForChart],filter(all(IPBI),[rank asc]<=5 || [rank desc ]<=5))
example of rank in visual level filter
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
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Datanaut Connect on Linkedin
Hi, I added a response in the original post - am able to upload images only to the original post it seems, and makes things much easier to explain.
- Anonymous6 years agoNot applicable
Hi mbidelski it is because ALL removes all the filters, you can use ALLSELECTED
- mbidelski6 years agoHelper I
With ALLSELECTED only the values from the filtered year get ranked. The rest is ranked at the bottom (last position in the ranking). The chart only shows one year. Screen: https://imgur.com/koOUhiF
- Anonymous6 years agoNot applicable
Hi mbidelski, can't see your image, use ALL or ALLSELECTED depends on how you want to RANK, RANKX can compare different values with the 3rd argument as well. You can get your slicer year into your measure, so it is dynamtic.
SOLUTION = CALCULATE(SUM(IPBI[Value]);IPBI[FY2]=SELECTEDVALUE(yourSlicerYear))
Rank = RANKX(ALL(IPBI);[SOLUTION];;DESC;Dense)