Forum Discussion
How to use Top N visual filter with Field parameter?
This is an old topic which i came by because i needed about the same (top N with variable field parameter. But in my case i also want a subtotal of all 'other' not shown).
The sollution is to calculate the rank for every field parameter (in the case of topic starter 3). This is explained in this video:
Is it Possible to Use Top- N with Field Parameters? ✨Top N Filter with Field Parameter in Power BI
Then you can make a simple If statement (if the rank < MaxValueOfTopN, 1, 0) and use this 1 or 0 in the filter for the visual.
I will now continue to search for a sollution for adding the 'other' row for the filterd rows with a subtotal of 'others'.
- johnt751 year agoSuper User
You can get an artificial "Other" row using the techniques described at https://www.sqlbi.com/articles/filtering-the-top-products-alongside-the-other-products-in-power-bi/