Let us consider a scenario where we need to represent similar information at two different category levels.
One potential and easiest way would be to create 2 charts or 2 visuals representing same metric at different levels. Like the one shown below:
In the above charts, I am displaying total transaction value by Region and by Attribute on 2 different charts.
Now suppose on the reporting tab, I have multiple visuals and I do not have enough space for these 2 charts. What should I do in such scenario, where client requirement still stands at having 2 separate charts?
Here we start to talk about Bookmarks and how we can use them to toggle or switch between 2 charts.
Let us start by creating 2 buttons in Power BI. Go to Insert --> Buttons --> Blank
I am using blank buttons for now. We can change the text or label for the button as shown below:
Similarly, I created a second button for Attribute:
Now starts our real work.
Go to View option on the top ribbon and click on Bookmarks. You will see a bookmarks pane on the right as highlighted below:
Now we will create 2 bookmarks for the 2 buttons that we have got.
Now we will define actions for the buttons. The screesnhot shown below is for the Region button: (Do the same for the Attribute button)
Now we need to achieve following things:
When I click on Region button, following actions should take place:
Transaction Value by Region chart
Attribute button (this will help us in switching to Attribute based chart)
HIDE Transaction Value by Attribute chart
HIDE Region button
When I click on Attribute button, following actions should take place:
Transaction Value by Attribute chart
HIDE Transaction Value by Region chart
HIDE Attribute button
Now go to Selection Pane on the right -->Hide Attribute button, Hide Transaction Value by Region chart; under Bookmarks PaneUPDATE the Attribute button.
We are basically creating an action for the Attribute button here. When this button is clicked, it should show us Transaction by Attribute chart and Region button, so that we have an option to switch back to Regional chart.
Similarly, we do the same settings for the Region button as shown below:
Now let us see how this is working in the report view. (Use Ctrl+Click in Power BI Desktop to click on a button)
Just to clean the visualisations, rather than having them side by side, let us place them in such a way that they are above each-other and completely cover each other up.
Transaction Value by Attribute chart and Region button should be together.
Transaction Value by Region chart and Attribute button should be together.
Just see the below image to make this clear – how I am trying to place these visuals and buttons on the top of each-other. This is in a way just taking up space for one single visual but in reality having 2 charts:
Now completely laying them over one another, I get the following:
Region button is placed below Attribute button
Transaction by Attribute chart is placed below Transaction by Region chart
Now let us see the completed functionality in a single frame:
So, when we click on Region button, we see chart related to region and Attribute button.
In case we need to switch back to Attribute related chart, same works for the Attribute button as well.
This is how we can toggle/switch between charts in Power BI, using Bookmarks and Buttons functionality.