Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Is there a way to add a button to a visual page to make the axes for the visuals on the page (stacked bars in my case) switch between Count and Distinct Count?
Solved! Go to Solution.
@j1s Yes, you can create 2 visuals and 2 buttons and stack them. Create 2 bookmarks using the Bookmarks pane along with the Selection pane to toggle between the visuals and buttons. Tie these bookmarks to the buttons.
Hi @j1s
@Greg_Deckler Thank you for sharing!
Yes, you can achieve your goals by creating bookmarks and buttons.
Here are the details, please try:
First, you need to create two versions of your stacked bar visual - one using Count and the other using Distinct Count. Ensure these are placed exactly on top of each other on your report page.
Next, create two bookmarks in Power BI - one for each visual state (Count and Distinct Count). Make sure to hide one visual and show the other for each bookmark accordingly.
Finally, insert a button on your report page that users can click to toggle between the two bookmarks (and thus, between Count and Distinct Count).
By following these steps, you'll effectively create a toggle mechanism on your report page, allowing users to switch the visual's axis between Count and Distinct Count with a simple click.
You can view the link below for more details:
Create report bookmarks in Power BI to share insights and build stories - Power BI | Microsoft Learn
Create buttons in Power BI reports - Power BI | Microsoft Learn
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks, any reason you're not advocating using the bookmark navigator button option, rather than creating and configuring normal buttons?
@j1s Yes, you can create 2 visuals and 2 buttons and stack them. Create 2 bookmarks using the Bookmarks pane along with the Selection pane to toggle between the visuals and buttons. Tie these bookmarks to the buttons.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
66 | |
63 | |
52 | |
39 | |
25 |
User | Count |
---|---|
80 | |
57 | |
45 | |
44 | |
35 |