BLOGS BY TOPIC▼
BLOGS BY AUTHOR▼
BLOGS BY YEAR▼
This blog gives some suggestions for how you might use the new bookmarks feature in Power BI Desktop.
Posted by Sam Lowrie on 24 March 2018
You need a minimum screen resolution of about 700 pixels width to see our blogs. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.
Expanding and collapsing menus using bookmarks
Sadly for users of SQL Server Reporting Services, there is no equivalent of outlining in Power BI Desktop, but we can create the illusion of it using bookmarks:
Clicking the + by a category reveals the next layer (Region > Town > Centre), while clicking on the - will collapse the layers one level.
To create this effect, first create all of the objects you will need, including images to create the expand and contract buttons and text boxes for the categories:
Cho txt and Apply button refer to the two text
boxes sitting on the back rectangle Par box.
Each level has a corresponding text box holding the level name. In addition each level also has an apply button.
Region and Town both have a + and a - icon to function as buttons (clicking on these will expand or collapse levels).
The bottom visuals supply control the visibility settings for the lowest level of the menu.
Working through each level, choose what you want to be visible and what to be invisible. For example when preparing the region bookmark the report should look like :
Although the apply button in this picture looks the same as the previous one, it is not! There are three apply buttons, one for each level.
On the selection pane you should hide all lower level objects (Town and Centre) including the text boxes, buttons and images:
One of the hardest things to remember is to create all of the objects before creating bookmarks, otherwise the objects won't be part of the bookmarks!
Now to create the bookmark, Highlight all of the objects in the selection pane that you want to be included (in this case all of them). Then choose to add a bookmark:
I've ticked Selected visuals as I don't want my bookmark to include the charts and tables I will create later.
Now unhide the region and attach this newly created bookmark to it, meaning when the - is clicked the user will be returned to the fully compressed list:
When adding links to objects, it is outside the influence of bookmarks. Therefore I can unhide and attach a link without the need to update the bookmark.
Do this for each level of your list. Once that is done it's time to make use of the apply button on each page. Create a chart and a table for each level:
The bookmark you set this up on is irrelevant, since we are creating a new bookmark based on these new visuals alone.
Again I have chosen Selected visuals not All visuals, as I don't want my menu at the top of the report to have anything to do with these visuals:
The settings for these objects don't matter, since we aren't selecting All visuals when creating the new chart/table bookmarks.
Create a bookmark for each level of your menu, making the appropriate chart and table appear each time. Then attach them to each apply button:
Then add the bookmark that makes the centre table/chart appear to the apply button (specifically the apply button which appears when the centre sub menu is revealed).
Add each chart/table bookmark to the corresponding apply button, then enjoy the menu expanding and when you click apply it shows a chart/table of that level!
Is it pretty? Sure. Is it worth the effort? Only you can answer that!