Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

tharunkumarRTK

How to Delete Bookmarks in Bulk in Power BI

Have you ever tried deleting multiple bookmarks in one shot? Unfortunately, I was not able to. I tried in multiple ways, but nothing worked. Firstly, there is no direct option to select all the bookmarks. We need to hold CTRL or SHIFT and then select each and every individual multiple bookmark that’s the only option to select all the bookmarks. I know it’s a lot of work. Even after that much of pain you will not have ‘Delete All’ option😞

Is there any other option? Well, Sadly I could not find any option on web. I went to my dear friend ‘ChatGPT’ and asked for help.

tharunkumarRTK_0-1727582292856.png

 

Let me breakdown all three suggestions: 

  1. Use ‘Bookmarks’ pane: We are very well aware of this option and it’s a tedious task. 
  2. Use ‘Tabular’ Editor: Tabular editor is read/write/create semantic model. Bookmark is a report level object. Tabular editor does even show bookmarks tab. This option does not make any sense. 
  3. Create a macro for simulating mouse clicks: Not sure how this works. I don’t want to pretend that I am aware of everything 🙂 

So, there isn’t any other quick and easy option? Nah! I found an option, and I was able to delete 450+ bookmarks in less than a minute without losing any of my work. Here are the steps I followed. 

Prerequisites: 

  1. Install Power BI Desktop and VS Code. 
  2. Enable Power BI Developer mode, PBIR and TMDL formats in preview settings, and restart your Power BI desktop before following the below steps. Checkout out my previous blog for more information about Power BI Developer mode. 

Points to remember: 

  1. PBIR, PBIP and TMDL formats are still in preview and have its own limitations. Keep a backup of your PBIX file before implementing the below steps. 
  2. For illustration purpose, I have taken a sample power bi report with 30 bookmarks. I will delete 25 bookmarks without effecting the remaining 5 

Procedure: 

Step 1: Open your PBIX report file and expand the bookmarks pane. Select the bookmarks which are required and should not be deleted, in my case I would select last 5. 

 

Natalie_iTalent_0-1728658317253.png

 

 

Step 2: Right click and group them. You can also give a meaningful name, I am naming it as ‘Don't Delete’ 

Natalie_iTalent_1-1728658379847.png

 

Grouping bookmarks 

Now I do not need any other bookmark which is out of this group. Let’s delete the remaining 25 quickly 

Step 3: Save the report in PBIP format. 

Natalie_iTalent_2-1728658412377.png

 

Step 4: Open the PBIP folder with VS Code 

Step 5: Navigate to bookmarks folder (). Under this folder you will find one .json file for every bookmark in the report. Name of this json file represents the bookmark id. 

Natalie_iTalent_3-1728658440348.png

 

Step 6: Open bookmarks.json file, here you will find the list of bookmarks in the sequential order. At the end, I can see a portion which represents the bookmarks group that I have created. 

Natalie_iTalent_4-1728658466865.png

 

Step 7: Now the task is to remove every json file which does not fall under this group. 

I would suggest you delete all the bookmark.json files and move them to recycle bin and then restore those bookmarks which are required. 

Natalie_iTalent_5-1728658493315.png

 

Step 8: In the bookmarks.json file remove all other bookmark ids expect the bookmarks under the group. 

Natalie_iTalent_6-1728658517413.png

 

And that’s it, save the file and open the PBIP file then you will only find the bookmarks that we have grouped. 

Natalie_iTalent_7-1728658547789.png

 

 

Let me know if you know any better way of deleting bookmarks in bulk. 

Need a Power BI consultation? Hire me on Upwork. 

Happy learning! 

Tharun 

 

Comments

What if you delete the group itself will it delete the bookmarks

@saud968 

Unfortunately its not. I tried doing the same and I did not work.

I have a task of deleting around hundred of bookmarks from a report, and just realised that there is no other option than deleting them one by one. You can't even use DEL key on your keyboard, but instead you have to right click each individual bookmark, scroll your mouse on the pop-up menu and hit 'Delete' option. OH-MY-WORLD. Thank you Power BI devs - you are true sadists.