How To Add A Button Using Bookmarks In Power BI

Introduction

 
In this article, you will learn how to create a button and how to use it in Power BI reports. In a Power BI report, you can add different types of buttons, as shown in the below image.
 
How To Add Button Using Bookmarks In Power BI
 
In this article, I will create a button using a bookmark. A bookmark is a very useful feature of Power BI. Using a bookmark, you can capture the current view of a report including filters and visuals used in the report. Whatever you configured in a bookmark you can get it by selecting the saved bookmark. You can also create a collection of bookmarks and arranged them in any order. To create a button with a bookmark, you need to create a bookmark first. To create a bookmark, go to the ‘View’ tab of the Power BI desktop and click on Bookmarks.
 
How To Add Button Using Bookmarks In Power BI 
 
When you create a bookmark, the below elements are saved with the bookmark:
  1. The current state of the report/page
  2. Applied Filters
  3. Slicers, including slicer type (for example, dropdown or list) and slicer state
  4. Visual selection state (such as cross-highlight filters)
  5. Sort order
  6. Drill location
  7. Visibility of an object (by using the Selection pane)
  8. The focus or Spotlight modes of any visible object
I am going to create a report using the ‘Employee’ table and ‘Department’ table. I have already imported the data from these two tables. I want to create a report where I can check the data in the table by clicking on a button. I will create 3 or 4 buttons according to the department name. Once I click on the ‘MKT’ button, I will get data of employees of the MKT department. Similarly, if I click on another button that represents the second department, I will get the data accordingly. See the below steps to perform this task.
 
Step 1
 
Import your data from the source. I have loaded two tables. See the below image
 
How To Add Button Using Bookmarks In Power BI 
 
See the data of employee table and Department table.
 
How To Add Button Using Bookmarks In Power BI 
How To Add Button Using Bookmarks In Power BI
 
See the relationship between these two tables.
 
How To Add Button Using Bookmarks In Power BI 
 
Step 2
 
Select table visual and data from these two tables. As we see a relationship between these two tables, we can select the column from both tables in a single visual. See the below image.
 
How To Add Button Using Bookmarks In Power BI 
 
Now, I will add a filter on the department name and create a bookmark for each department. For example, first I will apply a filter for the ‘MKT’ department. See the below image.
 
How To Add Button Using Bookmarks In Power BI 
 
Now create a bookmark on it. Go to the ‘view’ tab and click on ‘Bookmark’. When you click on ‘add’, a bookmark will be created with the default name ‘Bookmark 1’. You can rename it by double clicking on it.
 
How To Add Button Using Bookmarks In Power BI 
 
Similarly, by changing the filter you can add other bookmarks according to the department name. I have added five such bookmarks. To view these bookmarks you can click on ‘View’.
 
How To Add Button Using Bookmarks In Power BI 
 
Step 3
 
Now I am creating the buttons using these bookmarks. To add a button, go to the ‘Insert’ tab and click on the drop-down ‘Button’ option. Select ‘Bookmark’.
 
How To Add Button Using Bookmarks In Power BI 
 
A button will be added to your report. Rearrange the position according to your requirement by simply dragging and dropping. Give the name of the button by ‘button text’. Also, you can change the font color, background color, and alignment, etc.
 
How To Add Button Using Bookmarks In Power BI 
 
Go to the ‘Action’ and Bookmark as ‘MKT’.
 
How To Add Button Using Bookmarks In Power BI 
 
Your button will be created and once you click on it with ‘Ctrl’ (Ctrl+Click on the button) it will work and will show the data of the ‘MKT” department.
 
How To Add Button Using Bookmarks In Power BI 
 
Similarly, you can add more buttons to your report. I have added all five buttons according to my different department names.
 
How To Add Button Using Bookmarks In Power BI 
 
If you want to remove the bookmark sign from the button, you can set the ‘Shape’ as blank from the ‘Icon’ activity.
 
How To Add Button Using Bookmarks In Power BI 
 

Summary

 
I hope you understood how to create a button using a bookmark. This is a very useful task to add a button in reports. Thanks for reading.


Similar Articles