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
Krish_nidar
Helper I
Helper I

Show Top5 Dept default -Then show user selected department including select all

Hi Team,

I need your help as usual . Until now , I am ggeting valuable inputs for my issues in Power BI.

 

Problem

I am showing department wise budget values in the horizontal bar chart. There are 30 departments because of that ,its not looks good.

 

Any idea ? how to show. 

 

Then i had a plan that ,

 

we can show Top5 (Visual filter)  at the time of dashboard load. Then we can show basis on the department user selection (Slicer)

 

here, uer selection coming, but when i select "Select all " , It is showing Top5 (Thi nking because of Top5 visual filter)

 

Need your help how to achieve ?

1 ACCEPTED SOLUTION
rohit1991
Super User
Super User

Hii @Krish_nidar 

 

This happens because a Visual-level Top 5 filter always forces the chart to show only the Top 5, even when the slicer selects “All.” To make it work, remove the Top 5 visual filter and instead create a measure-based filter that shows Top 5 only when no slicer selection is made, and shows all departments when the user selects anything. Example:
ShowFlag = IF( ISFILTERED(Dept[DeptName]), 1, IF( RANKX(ALL(Dept), [Budget]) ≤ 5, 1, 0 ) ).
Then filter the visual where ShowFlag = 1. Now the chart will show Top 5 by default and show all selected departments (including Select All) when the user interacts with the slicer.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

View solution in original post

3 REPLIES 3
v-echaithra
Community Support
Community Support

Hi @Krish_nidar ,

Thank you @rohit1991 , @alish_b  for your inputs.

I just wanted to check if the issue has been resolved on your end, or if you require any further assistance. Please feel free to let us know, we’re happy to help!


Thank you 
Chaithra E.

rohit1991
Super User
Super User

Hii @Krish_nidar 

 

This happens because a Visual-level Top 5 filter always forces the chart to show only the Top 5, even when the slicer selects “All.” To make it work, remove the Top 5 visual filter and instead create a measure-based filter that shows Top 5 only when no slicer selection is made, and shows all departments when the user selects anything. Example:
ShowFlag = IF( ISFILTERED(Dept[DeptName]), 1, IF( RANKX(ALL(Dept), [Budget]) ≤ 5, 1, 0 ) ).
Then filter the visual where ShowFlag = 1. Now the chart will show Top 5 by default and show all selected departments (including Select All) when the user interacts with the slicer.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!
alish_b
Impactful Individual
Impactful Individual

I believe the ISFILTERED will give the same output for the two cases: when nothing is selected (dashboard load default) and when Select All is selected. So, in case of Select All selection, it will give Top 5 instead of showing all departments.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Users online (5,022)