How to Switch Visuals in Power BI with Buttons

Cody Schneider9 min read

Switching between different charts in a single space on your Power BI report is an excellent way to make your dashboards more interactive and less cluttered. Instead of creating multiple pages for different views, you can give users control with a simple button click. This article guides you step-by-step through the process of using bookmarks and buttons to dynamically switch between visuals.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Why Let Users Switch Visuals?

Giving users the ability to change chart types on the fly offers several distinct advantages. It moves your report from a static display to an interactive tool, which immediately makes it more engaging and valuable for your audience.

  • Saves Prime Dashboard Real Estate: Screen area is precious. Instead of cramming in a bar chart, a line chart, and a pie chart to show different aspects of the same data, you can layer them in one spot. This frees up space for other important metrics and keeps your report looking clean and professional.
  • Reduces Clutter and Overwhelm: A dashboard crowded with too many visuals is hard to read. By consolidating related charts, you create a more focused and digestible experience, helping users find the insights they need without getting lost.
  • Provides Deeper Context: Different charts tell different stories. A bar chart might be perfect for comparing sales across product categories, while a line chart is better for showing how total sales have trended over time. Letting a user toggle between these gives them a more complete understanding of the data from multiple perspectives. For example, they can see which category is the top performer and how its performance has changed over the last year, all in the same part of the report.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

The Key Ingredients: Bookmarks and the Selection Pane

The "magic" behind this technique relies on two fundamental Power BI features working together: bookmarks and the Selection pane. When you understand how these two work, the process becomes incredibly straightforward.

Bookmarks in Power BI do exactly what their name suggests: they save a specific "state" or view of your report page. This includes things like filters, slicers, and, most importantly for our purpose, the visibility of objects on the page. You can create one bookmark that shows Chart A and another bookmark that shows Chart B.

The Selection Pane is your control center for all the objects on a report page. It lists every single chart, text box, image, and button. From this pane, you can show or hide any object by clicking a small eye icon next to its name. We will use this pane to set up which visuals are visible before saving each bookmark.

Finally, we'll use Buttons as the trigger. We simply tell a button, "When you are clicked, take the user to this specific bookmark." It’s a simple yet powerful combination.

Step-by-Step Guide: Toggling Between Two Visuals

Let’s walk through building an interactive toggle from start to finish. For this example, we’ll create a toggle between a Bar Chart showing sales by product category and a Line Chart showing sales over time.

Preparation: Set Up Your Visuals

First, you need the charts you want to toggle between. Create your two visuals on the report canvas as you normally would.

  1. Create your two charts. Go ahead and build a bar chart and a line chart using your data.
  2. Align them perfectly. Click and drag one visual directly on top of the other. To ensure they are perfectly aligned, hold the Ctrl key, select both visuals, navigate to the Format tab, click Align, and choose both Align Center and Align Middle. They should now occupy the exact same space.

Step 1: Open and Organize the Selection Pane

With your visuals layered, it's time to set up their visibility. First, open the necessary panes.

  1. Navigate to the View tab in the Power BI ribbon.
  2. Check the boxes for both Selection and Bookmarks to open them. They will typically appear on the right side of your screen.
  3. In the Selection pane, you will see generic names for your visuals like "Bar chart" and "Line chart." To avoid confusion, double-click on each name and give them descriptive titles. For example:
GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Step 2: Create the First Bookmark (Bar Chart View)

Now, we'll create the first saved state where only the bar chart is visible.

  1. In the Selection pane, find your Line Chart, Sales Over Time (Line Chart), and click the eye icon next to it to hide it.
  2. Ensure the eye icon next to Sales by Category (Bar Chart) is visible (not crossed out). You should now only see the bar chart on your canvas.
  3. In the Bookmarks pane, click Add. A new bookmark will appear with a generic name like "Bookmark 1."
  4. Rename this bookmark to something clear, like View Bar Chart.
  5. Click the three dots (...) next to the bookmark name and, crucially, uncheck the "Data" option. This ensures that clicking the bookmark won't reset any filters or slicers your user has applied to the page. It will only affect the display properties, which is exactly what we want.

Quick Check: Click away to a different page and then click your View Bar Chart bookmark. You should see just the bar chart.

Step 3: Create the Second Bookmark (Line Chart View)

Next, we’ll do the opposite to create the view for our line chart.

  1. Go back to the Selection pane. This time, hide the bar chart (Sales by Category (Bar Chart)) and make the line chart (Sales Over Time (Line Chart)) visible.
  2. Now, in the Bookmarks pane, click Add again to create a new bookmark.
  3. Rename this one to View Line Chart.
  4. Just as before, click the three dots (...) next to this new bookmark and uncheck the "Data" option.

Quick Check: Test both of your bookmarks. Clicking View Bar Chart should show the bar chart, and clicking View Line Chart should show the line chart. If that works, you’re ready for the final step.

Step 4: Add Buttons and Link Them to Your Bookmarks

With our views saved, we just need to give the user clickable buttons to trigger them.

  1. Go to the Insert tab, click Button, and choose Blank. Create two identical buttons.
  2. Place the buttons somewhere intuitive, like above the layered charts.
  3. Select the first button. In the Format pane, turn on the Text property and label it "Bar Chart View."
  4. In that same Format pane, find the Action section and toggle it On.
  5. Set the Type to Bookmark.
  6. Set the Bookmark to View Bar Chart.
  7. Now, repeat the process for the second button. Label its text "Line Chart View" and assign its action to the View Line Chart bookmark.

Step 5: Test Your Interactive Report

Your interactive toggle is now complete! In Power BI Desktop, you need to hold down Ctrl while you click the buttons to activate their actions. Once you publish your report to the Power BI service, your end-users will only need a single click. Go ahead and test it out!

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Pro-Tips for a Better User Experience

Once you've mastered the basics, you can add a few extra touches to make your visual toggles even more effective.

  • Use Stateful Buttons: Give users visual feedback on which view is active. For example, for the "Bar Chart" button, go to its formatting options and change the "Default state" fill color to an obvious active color (like a darker gray or a brand color). Once you have it styled, right-click the View Bar Chart bookmark and choose Update. Repeat this for the "Line Chart View." Now, when a user clicks a button, it will appear "selected."
  • Group Objects: What if you want to toggle not just a chart, but also a custom title or a text box with commentary? In the Selection pane, you can use Ctrl + Click to select multiple items (e.g., your chart and a text box) and then right-click to Group them. You can then show or hide this entire group with a single click, and link your bookmark to the group’s visibility.
  • Use Icons Instead of Text: For a cleaner look, use icons instead of buttons with text. Go to Insert > Buttons and you'll see options for icons like charts and tables. Or, insert your own custom images (Insert > Image) and assign bookmark actions to them.

Common Pitfalls to Avoid

As you build, here are a couple of common issues that can cause frustration. Keep an eye out for them:

  • Forgetting to Uncheck 'Data' on Bookmarks: This is the most common mistake. If you leave 'Data' checked, your bookmark will capture the current state of your filters, slicers, and cross-highlighting. Then, an unsuspecting user who clicks your button will find all their filters suddenly reset, which can be confusing and annoying.
  • Poor Naming Conventions: When a page has dozens of elements, "Button 17" or "Bookmark 24" becomes meaningless. Take the five extra seconds to rename every visual, button, and bookmark as you create them. It makes managing and troubleshooting your report a thousand times easier.
  • Improper Alignment: If the visuals aren't perfectly layered, the toggle will 'jump' when the user clicks a button. Always use the alignment tools in the Format tab to ensure a seamless transition.

Final Thoughts

That's all there is to it. By combining the power of the Selection pane, Bookmarks, and Buttons, you can transform a standard report into a dynamic and professional-looking dashboard. This technique gives users more control and allows you to present more information in a highly space-efficient way.

While mastering tools like Power BI is a valuable skill, sometimes the learning curve and manual setup can slow down how quickly you can get answers from your data. If you spend more time building reports than analyzing them, we built Graphed to help. Instead of clicking through menus and panes, you just connect your data sources - like Google Analytics, Shopify, or Salesforce - and use plain English to describe the dashboard you need. Graphed automates the busy work so you can get real-time insights in seconds, not hours.

Related Articles