I recently worked with a client who needed to customize the visuals in their Power BI reports to reflect their business data better. Changing visuals in Power BI is a powerful way to enhance data presentation and make your reports more insightful.
In this tutorial, I will show you how to change the visual in Power BI using bookmark buttons, allowing users to switch between pie, bar, and line charts.
Additionally, I will guide you through the process of creating a dynamic measure slicer, enabling users to select metrics such as Sales, Profit, or units sold, with the visual automatically updated based on their selection.
Change the Visual in Power BI With BookMark Buttons
For this example, I have an Excel sheet that contains Item Name, Category, details, Revenue, Region, Platform, and Date columns.

Now follow the below steps:
1. Open Power BI Desktop and load the above Excel in the Power BI. Then, you can see data in the Data pane.

2. Create a pie chart with the regions in the legend and revenue in the value section.

3. Then, create a bar chart with the Platform in the Y-axis and revenue in the X-axis.

4. I created a line chart with the Day on the X-axis and revenue on the Y-axis.

5. Adjust the size of the visuals and place them on top of each other so that they appear as one visual when the button is clicked.

6. Open the Selection and Bookmarks panes. Select the bar chart, then hide the other two visuals in the Selection pane. In the Bookmarks pane, add a new bookmark. You’ll see it named ‘Bookmark 1,’ which you can rename as needed.

7. Same thing for line charts and pie charts.

8. Then we need to add a button, so click Insert tab -> expand the Buttons and select Blank.

9. Select the blank button, expand the Format button section, then expand the Action settings. Set the type to ‘Bookmark’ and choose the ‘Bar Chart’ bookmark.

10. Expand the Button Style section, then expand the Text settings. Enter the button’s name; in my case, it’s ‘Bar Chart.’

11. In the same way, add a button for the Line Chart and Pie Chart.

Now, all the bookmark buttons are created successfully. Hold Ctrl and click the ‘Bar Chart’ button to test this. You will see the difference. Similarly, you can test all the buttons.
Change the Visual Axis Value Based On Dynamic Measure Slicer in Power BI
I recently worked with a dataset that required creating a dynamic report where users could analyze different metrics like Sales, Profit, or Unit Sales based on their selection. The goal was simple but powerful: use a slicer to let users choose the metric they want to view and automatically update the visual to display that metric by Product.
For instance, when the user selects Sales, the visual should show Sales by Product. If they choose Profit, the same visual should dynamically update to display Profit by Product—all without needing a separate visual.
For this example, I used the below data, which is present in Power BI:

Now follow the below steps:
1. Add a new table. Provide the column name as Select Slicer, and the values are Profit, Sales, and Unit Sold.

2. Then create a Measure table and add Profit measure in the formula bar, click the below expression. Then click Commit.
Profit = SUM(financials[Profit])Where:
- Profit: This is the name of the calculated measure.
SUM: This DAX function calculates the sum of all the values in a specified column.- financials[Profit]: financials refers to the table’s name in your data model.[Profit] refers to the column within the financials table whose values you want to sum up.

3. Then create Sales Measure in the formula bar, put the below expression. Then click Commit.
Sales = SUM(financials[ Sales])- Sales: This is the name of the measure.
- SUM: This DAX function adds up all the values in the specified column.
- financials[Sales]: financials refers to the name of your table in the data model. [Sales] is the column in the financials table containing the sales data you want to aggregate.

4. create Unit Sales Measure using below expresion:
Unit Sold = COUNT(financials[Units Sold])- Unit Sold: This is the name of the measure.
- COUNT: The COUNT function in DAX counts the number of non-blank values in a column.
- financials[Units Sold]: financials is the name of your table. [Units Sold] refers to the column in the financials table that contains the units sold for each record.

5. Now, create a dynamic measure that changes based on the slicer selection. Add a new measure using the below DAX expression:
Dynamic Measure =
SWITCH(
TRUE(),
SELECTEDVALUE('Table'[Select Slicer]) = "Profit", [Profit],
SELECTEDVALUE('Table'[Select Slicer]) = "Sales", [Sales],
SELECTEDVALUE('Table'[Select Slicer]) = "Unit Sold", [Unit Sold],
BLANK()
)This formula checks the value selected in the slicer and returns the corresponding measure (Profit, Sales, or Unit Sold).

6. Add the slicer and drag the ‘Select Slicer’ table. You will now have a slicer with the options: Profit, Sales, and Unit Sold.

7. Next, add a Column Chart or any other visual you prefer. Drag the Product field (or any field you want to analyze) to the X-axis, and drag the newly created Dynamic Measure to the Values.

Now, when you select Profit, the visual should display Profit by Product. When you select Sales, the visual updates to show Sales by Product, and similarly for Unit Sold.
Conclusion
This tutorial covered two techniques for enhancing your Power BI reports. First, I explained how to use bookmark buttons to switch between different visuals, allowing users to view charts based on their selection, such as pie, bar, and line charts. Then, I showed how to create a dynamic measure slicer that allows users to choose between metrics like Sales, Profit, or Unit Sold and update the visual accordingly, all within the same chart.
Moreover, you may like some more Power BI tutorials:
- Convert Base64 to PDF Using Power BI
- Power BI vs Power Apps [Complete Comparison]
- Apply Conditional Formatting in Power BI Bar Chart
- Show Percentage in a Power BI Bar Chart Data Label

Preeti Sahu is an expert in Power Apps and has over six years of experience working with SharePoint Online and the Power Platform. She is the co-author of Microsoft Power Platform: A Deep Dive book. As a Power Platform developer, she has worked on developing various tools using Power Apps and Power Automate. She also makes Microsoft 365 videos and shares them on YouTube.