Forum Discussion
Dunner2020
Post Prodigy
6 years agoTop 10 Button on the report
Hi there, Is it possible in Power BI to have a button (as visualization) that we click to show the top 10(N) values? For example, if I have a sales related information, I want to display a button...
- 6 years ago
Hi Dunner2020 ,
andre has the right idea, but you only need one chart, but two buttons.
- Create two buttons, one with Top 10 text, one with All text.
- Create a filter on your visual that shows an axis or column by TopN values, then use the measure for the value. For example, this is a small data set, so I used top 2.
-
- Hide the "top 10 button.
- Create a bookmark and call this "Top 10" - it should be showing the All button, and the top 10 items. (change the text to have it say "Show All Items" if you want, or "Showing Top 10, click to Show All" - whatever is easiest for your users.
- Now, remove the filter on the visual so all items are showing
- hide the All button and show the Top 10 button
- Create a new bookmark and call this All.
- Assign the All bookmark to the All button, and the Top 10 bookmark to the Top 10 button.
See my PBIX file for an example. You will need to CTRL-CLICK the buttons in the desktop. In the service, just clicking works.
edhans
Community Champion
6 years agoHi Dunner2020 ,
andre has the right idea, but you only need one chart, but two buttons.
- Create two buttons, one with Top 10 text, one with All text.
- Create a filter on your visual that shows an axis or column by TopN values, then use the measure for the value. For example, this is a small data set, so I used top 2.
-
- Hide the "top 10 button.
- Create a bookmark and call this "Top 10" - it should be showing the All button, and the top 10 items. (change the text to have it say "Show All Items" if you want, or "Showing Top 10, click to Show All" - whatever is easiest for your users.
- Now, remove the filter on the visual so all items are showing
- hide the All button and show the Top 10 button
- Create a new bookmark and call this All.
- Assign the All bookmark to the All button, and the Top 10 bookmark to the Top 10 button.
See my PBIX file for an example. You will need to CTRL-CLICK the buttons in the desktop. In the service, just clicking works.
Kshamaa
3 years agoNew Member
Hi,
I tried this solution and getting an error
Even if I remove the filters to show all values of table still I am getting only top 2 for ALL button.