Forum Discussion
Dynamic TopN filter in Power BI
Anonymous
I'm not too sure what your dataset includes. Is it a single column listing "Word 1", "Word 4", "Word 3" etc as individual values, or do you have 2 columns (one for "Word" and another for a value? If the latter, does that mean that there is a single ID value for "Word"?
To calculate TopN you can use either TopN or RANKX for the measure, depending on what you wish to see. If by "dynamic TopN" you mean you wish to select the TopN using a slicer, you will need to create a independent table listing the rank values you wish to filter by.
Please also provide a depiction of what you wish to see in the visual.
- Anonymous5 years agoNot applicable
Yes. I have only single column in table with values "Word 1", "Word 4", "Word 3", "Word 1" etc. All values are repetitive, so I calculate total count of each Word.
Here I'm using TopN slicer and then use RANKX to rank each words.
When I use rankx it returns 1 in each row.TotalTitle = COUNT('Content Catalog Search Result Report'[Title])Rank = RANKX(All('Content Catalog Search Result Report'[Title]),[TotalTitle], ,DESC)