Is it possible to do a dynamic filter in power Bi?
I want to show TOP 20 or TOP 10 or TOP 5 in columns chart. Now I have a filter with less 20 , but I need to mark in slice and show other data.
Thank in advance.
Effectively, there is no out of the box function to do TOP N. When I have to do this, I used the following method to do that
let's imagine the following table (Table1):
I add a column with this DAX formula: rang = RANKX(Table1,Table1[Sales])
And then, I add another column with TOP N Formula Top = IF(Table1[rang]<=2,"TOP2") Table in Power BI Desktop
In the report, I add a slicer based on the TOP N column Report Sample
The only thing is that the blank value still remains in the slicer. Another way to do kind of top N, is to still add a column with rank and add this column to report level filter.