How to Use Toggle Button in Power BI

Cody Schneider9 min read

Want to let users switch between two different views in your Power BI report with a single click? That's exactly what a toggle button does. It’s an elegant solution to make your reports more interactive and less cluttered. This guide will show you how to build one step-by-step using a clever combination of bookmarks and buttons.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

What is a Toggle Button in Power BI?

A toggle button in Power BI allows a user to switch back and forth between two predefined states or views on a report page. Think of it as a light switch for your data visualizations. Instead of creating separate pages for slightly different views of the same data, you can consolidate them into one dynamic space, controlled by the user.

This technique isn't an "out-of-the-box" feature but rather a smart combination of core Power BI functionalities: bookmarks, buttons, and the Selection pane. By mastering this combination, you can dramatically improve the user experience of your reports.

Common Use Cases for a Toggle Switch

You might use a toggle button to allow users to switch between:

  • Metric Types: A bar chart showing sales by Amount ($) vs. a bar chart showing sales by Quantity Sold.
  • Visualization Types: A map showing sales by state vs. a table showing the same sales data in a grid.
  • Granularity: A line chart showing monthly trends vs. a line chart showing weekly trends.
  • Calculations: A chart displaying total values vs. the same chart showing a percentage of the total.

The main benefits are conserving valuable report real estate and putting analytical control back into the hands of your end-users, making the entire experience less static and more engaging.

The Building Blocks: Bookmarks and the Selection Pane

Before diving into the steps, it's important to understand the two main tools that make this entire process possible: the Selection Pane and Bookmarks.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Understanding the Selection Pane

The Selection pane is one of your most powerful allies for building complex report layouts. You can find it by going to the View tab in the Power BI Desktop ribbon and checking the box for Selection.

This pane lists every single object on your report page - visuals, shapes, text boxes, and buttons. Next to each item, you’ll see a little eye icon. Clicking this icon allows you to show or hide the object. This visibility control is the main engine behind the toggle switch effect.

Pro Tip: Double-click on the object names in the Selection pane to rename them. Instead of generic names like "Bar chart" or "Button," use descriptive names like "Chart: Sales by Region" and "Button: Show by Category." This small organizing step will save you a lot of confusion later on.

Understanding Bookmarks

Bookmarks capture the current state of a report page. You can access the Bookmarks pane by navigating to the View tab and selecting Bookmarks.

A bookmark can save several properties of a page, such as:

  • Current filters and slicers
  • The sort order of a visual
  • The drill-down location of a visual
  • And most importantly for our purpose, the visibility of objects (as defined in the Selection Pane)

We'll create two bookmarks: one capturing the page when our first visual is visible, and a second for when our other visual is visible.

Step-by-Step: Building Your First Toggle Switch

Let's walk through building a toggle that switches between a map visual showing Sales by Country and a bar chart showing Sales by Product Category.

Step 1: Create Both Visuals on the Same Page

First, create the two visuals you want to toggle between. Add a Map visual and a Stacked column chart to your report page. Configure them with the data you want to display.

Now for the trick: place both visuals in the exact same spot on the page, right on top of each other. This ensures that when we toggle between them, the transition is seamless, and our report layout stays consistent. You can use the alignment tools under the Format tab to position them perfectly.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 2: Name Your Visuals in the Selection Pane

Open the Selection pane (View > Selection). You'll see your two new visuals with default names. Give them clear, meaningful names so you can easily identify them:

  • Rename the map visual to "Map_SalesByCountry"
  • Rename the column chart to "Bar_SalesByCategory"

Step 3: Configure and Capture Your First View (Bookmark 1)

Now we’ll create our first bookmark, which will represent the "State A" of our toggle. In this state, we want to see the map and hide the bar chart.

  1. In the Selection Pane, click the eye icon next to "Bar_SalesByCategory" to hide it. Now, only the map should be visible on your report canvas.
  2. Open the Bookmarks pane (View > Bookmarks).
  3. Click the Add button to create a new bookmark.
  4. Rename this new bookmark to something descriptive, like "View: By Country".

Now for the most important part. Click the three dots (...) next to your new bookmark and look at the options. By default, Data is checked. This means the bookmark saves any active filters or slicers. For a simple visual toggle, you almost always want to uncheck "Data." This ensures that if a user applies a filter, clicking the toggle won't reset their filter selection. You want the bookmark to only control the display properties.

At this point, you only need to keep Display checked. The bookmark saves which visuals and objects are currently visible — which is all a visual toggle switch needs.

Step 4: Configure and Capture Your Second View (Bookmark 2)

Next, we will do the exact same process for our second view.

  1. In the Selection Pane, reverse the visibility. Hide "Map_SalesByCountry" (by clicking eye icon) and make "Bar_SalesByCategory" visible.
  2. In the Bookmarks pane, click Add again to create the second bookmark.
  3. Rename it to "View: By Category".
  4. Just like before, click the three dots and uncheck "Data."

Test it out! Click on "View: By Country" in the Bookmarks pane — the map should appear. Click on "View: By Category" — the bar chart should appear. If this works, you're halfway there.

Step 5: Add and Configure the Toggle Buttons

Bookmarks make it work, but buttons make it accessible for the user.

  1. On the ribbon, go to Insert > Buttons > Blank. Create two blank buttons.
  2. Label one "By Country" and the other "By Category". You can do this in the Format pane > Style > Text.
  3. Select the "By Country" button. In the Format pane, turn on the Action option.
  4. Now, select the "By Category" button and turn on its Action.

In Presentation Mode, or by holding Ctrl and clicking the buttons in Power BI Desktop, you can now switch between your two views. But there's one problem: both buttons are always visible, which can be confusing. The final step is to create the true "toggle" magic.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 6: Creating the True Toggle Effect

To make it a true toggle, the button corresponding to the current view should hide, and the button to switch to the other view should appear.

First, go back to the Selection Pane and give your buttons descriptive names, like "Button_GoToCategory" and "Button_GoToCountry". Place them in the exact same spot on the canvas, one on top of the other.

Now, let's update our bookmarks one last time:

  1. Update the first bookmark: Click the "View: By Country" bookmark to activate that state. In the Selection pane, configure object visibility so that:
  2. Once everything is set correctly, hover over the "View: By Country" bookmark, click the three dots, and select Update.
  3. Update the second bookmark: Now click the "View: By Category" bookmark to activate it. In the Selection pane:
  4. Hover over the "View: By Category" bookmark, click the three dots, and select Update.

And that's it! Now, when a user is on the Country view, they will see a button that says "By Category." When they click it, the chart will change, and the button itself will appear to change to say "By Country."

Tips for a Better User Experience

To take your toggle buttons from functional to professional, here are a few extra tips.

  • Group Your Objects: In the Selection Pane, you can Ctrl+Click to select multiple objects (like a chart and its corresponding button) and group them. This makes it easier to manage visibility for each state. Instead of hiding/showing individual elements, you just hide/show the whole group.
  • Use Hover and Press States: Power BI's buttons have different style settings for their Default, On hover, and On press states. Add subtle changes like a slightly different background color on hover to make the buttons feel more interactive and modern.
  • Consider Bookmark Navigators: For toggling between more than two views, creating individual buttons for each can get crowded. Power BI now offers a "Bookmark Navigator" visual that automatically creates buttons for any bookmark in a specific group. It simplifies the setup for more complex scenarios.
  • Descriptive Tooltips: Add tooltips to your buttons under the Action card. A simple tooltip that says "Click to view sales by category" can help guide users who might be unfamiliar with your report's interface.

Final Thoughts

By cleverly combining visual layers, the Selection pane, bookmarks, and buttons, you can build a clean toggle switch that elevates the user experience of your report. Learning this technique opens up a new level of interactive design that can save screen space, reduce clutter, and give your users more control over how they analyze their data.

Building interactive reports in tools like Power BI is powerful but often involves countless manual clicks for every chart and interaction. At Graphed we’ve simplified the process of getting from raw data to actionable insights by automating report and dashboard creation. By connecting your sources and simply describing the charts you need in plain English, our AI-powered analyst builds live dashboards for you, so you can spend less time configuring and more time analyzing.

Related Articles

How to Enable Data Analysis in Excel

Enable Excel's hidden data analysis tools with our step-by-step guide. Uncover trends, make forecasts, and turn raw numbers into actionable insights today!