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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
OLM
Helper I
Helper I

Dynamic Top N slicer works with table, not with bar chart

Dynamic Top N slicer works with table, not with bar chart

 

Seeing I cannot expose the real data, I will present similar and simple example

 

Lets say I have a sales table with 1k sales across 5 product categories.

 

Now on the dashboard I present the top N per table visual (sales id, amount, product category) using the following guideline: 

 

1. Create TopN table using DAX: 5, 10,15

2. Create Rankx to ranks sales by amount

3. Create DisplayTopN measure

4. In table visual filter pane set DisplayTopN = 1

 

TopN dynamic slicer works on the table.

 

What does not work:

 

Bar chart displaying only Top N as in the table visual but as total sales per category. For example: top 5 product divided across categories and if slicer set to 15 than 15 product divided and sumed per category.

 

Instead bar chart picks on all sales despite it having also DisplayTopN = 1.

 

Please your help.

 

Thank you.

1 ACCEPTED SOLUTION
OLM
Helper I
Helper I

Thank you for the help. In the end I have solved it using an aggration measure, ranking measure and a display measure. 

View solution in original post

3 REPLIES 3
OLM
Helper I
Helper I

Thank you for the help. In the end I have solved it using an aggration measure, ranking measure and a display measure. 

OLM
Helper I
Helper I

I will fix something. But for now, can you share an example of a dashboard with a dynamic Top N slicer filtering a bar chart? It should be a common requirement, but surprisingly not easy to find one conclusive approach.

Ashish_Mathur
Super User
Super User

No one wants your actual data.  Share some dummy data, explain the question and show the expected result.  Share data in a format that can be pasted in an MS Excel file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.