Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
showy123
Frequent Visitor

Build dynamic TopN Filter on page with fieldparameter

Hi everyone,

I am trying to build a dynamic TopN filter with field parameters. I cannot use field parameters in the filter bar under TopN filtering, so I would like to put it on the page and use it to dynamically move the TopN number.

 

I have a D_Article and an F_Sales.

With the field parameter, I can switch between F_Sales[Quantity] and F_Sales[Revenue]. Now I would also like to have the option of controlling the number of bars in the visual with a TopN filter on the page.

 

Does anyone have any ideas?

 

showy123_0-1763043010411.png

showy123_1-1763043022310.png

 

1 ACCEPTED SOLUTION
kushanNa
Super User
Super User

Hi @showy123 

 

There must be different ways to solve this, but here is my solution:

  1. Create a numeric parameter (TopN).

  2. Create two measures (TopN Filter Chart1 and TopN Filter Chart2) — one for each chart — that return 1 if the column falls into topN. Use these measures as visual-level filters to show only 1.

I have attached a sample file with the measures I created for your reference.

 

Recording 2025-11-14 123652.gif

 

 

 

 

 

View solution in original post

6 REPLIES 6
kushanNa
Super User
Super User

Hi @showy123 

 

There must be different ways to solve this, but here is my solution:

  1. Create a numeric parameter (TopN).

  2. Create two measures (TopN Filter Chart1 and TopN Filter Chart2) — one for each chart — that return 1 if the column falls into topN. Use these measures as visual-level filters to show only 1.

I have attached a sample file with the measures I created for your reference.

 

Recording 2025-11-14 123652.gif

 

 

 

 

 

Hi
works perfect, thank you a lot

ajaybabuinturi
Memorable Member
Memorable Member

Hi @showy123,

You can use below article to fulfill your requirement and also you can find sample .pbix file in that.
https://community.fabric.microsoft.com/t5/Power-BI-Community-Blog/Creating-an-interactive-Dynamic-TO... 

Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.

Hi Thanks for your reply,

what is the best way to share the ..pbix? I tried to drag and drop it inside here but .pbix is not supported.

hi @showy123,

You can keep your sample file in any of cloud platform and share that url by using insert/edit link.


Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors