Forum Discussion
Dynamic Filter using TopN or Rank/RankX
- 4 years ago
Hi, Anonymous
Step 1: Create a ranking measure_Rank = RANKX(ALLEXCEPT(financials,'financials'[Country],financials[Product]),CALCULATE(SUM(financials[Profit])),,DESC,Dense)Step 2: Create a What If parameter (GENERATESERIES(1, 100, 1))
Step 3: Create a measure that controls whether records are displayed
_Show = IF([_Rank]<='_Selected Records'[_Selected Records Value],1,0)Step 4: In the filter pane, filter for items where the measure of Step 3 is equal to 1
Please refer to the attachment below for details.
Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Anonymous
Step 1: Create a ranking measure
_Rank =
RANKX(ALLEXCEPT(financials,'financials'[Country],financials[Product]),CALCULATE(SUM(financials[Profit])),,DESC,Dense)
Step 2: Create a What If parameter (GENERATESERIES(1, 100, 1))
Step 3: Create a measure that controls whether records are displayed
_Show =
IF([_Rank]<='_Selected Records'[_Selected Records Value],1,0)
Step 4: In the filter pane, filter for items where the measure of Step 3 is equal to 1
Please refer to the attachment below for details.
Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.