cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Anonymous
Not applicable

Dynamic Filter using TopN or Rank/RankX

Hi, I created a TopN filter and an Rank on a field in a table. I also created a filter with a slider.

My qustion is how could I use that slider as a filter, so that if a user wants to 5 records, the slide it to 5, or 6, 7, etc.

I have a default setting of showing 5 records but would love to give a user the ability to choose as many as they'd like. 

thank you.

1 ACCEPTED SOLUTION
v-angzheng-msft
Community Support
Community Support

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

vangzhengmsft_0-1646100345135.png

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.

View solution in original post

2 REPLIES 2
v-angzheng-msft
Community Support
Community Support

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

vangzhengmsft_0-1646100345135.png

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.

mh2587
Solution Sage
Solution Sage

You can get it from topN filter on filter pane



Muhammad Hasnain

#LetsConnect https://www.linkedin.com/in/hasnain2587/

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors