Sub topic 5
Assigning button actions
This chapter assumes you can insert a button, use the Selection pane, and create bookmarks with the Data, Display, and Current page options. Here you connect a button to something that happens when a user clicks it.
Where actions are set
Select a button, open the Format button pane, and turn on Action. Set Type to one of the actions below. Each type adds its own settings, such as a destination.
| Action type | What it does | Needs |
|---|---|---|
| Bookmark | Applies a saved bookmark | A bookmark name |
| Page navigation | Opens another report page | A destination page |
| Back | Returns to the previous page, or closes a drill-through | Nothing |
| Apply all slicers | Applies pending slicer selections | Slicers set to "Apply" mode |
| Clear all slicers | Clears every slicer on the report | Nothing |
Hold Ctrl and click the button in Power BI Desktop to run its action while you edit. A plain click only selects it.
Bookmark action
This is the action behind most interactive patterns. Pick Bookmark as the type, then choose the bookmark under Bookmark. When the user clicks, Power BI restores what that bookmark captured: visibility, filters, or the page, depending on its capture options.
Every button that applies a bookmark depends on that bookmark's options. A bookmark with Data turned off will not change slicer selections, however the button is configured.
Page navigation action
Pick Page navigation, then choose a Destination. Hidden pages are valid destinations, which is a common way to build a detail page that the page tabs do not show.
Back action
The Back action is meant for drill-through pages. It returns the user to the page they came from. Outside drill-through, it has no history to return to and may do nothing useful. Use a Page navigation button when you need a fixed destination.
Slicer actions
Clear all slicers resets every slicer on the report to its unfiltered state, not only those on the current page. This surprises people who expect it to affect only the visible page.
Apply all slicers works with the slicer setting Query reduction > Add an Apply button to each slicer (or a single Apply button for all slicers). Users change several slicers first, then click one button to run the query.
Tooltips and accessibility
Under the action settings, add a Tooltip that says what the click does, such as "Show filters". Also set Alt text in the General settings. Screen reader users depend on it, since a button may contain no visible text.
Common errors
- The button does nothing in Desktop. You clicked without Ctrl, or no action is turned on.
- The wrong state appears. The linked bookmark was captured with different options than you expected. Update it after changing the report.
- The bookmark option is empty. You have not created any bookmarks yet. Create them first.
- Slicers do not clear on a page. A slicer may be set to sync or is outside the report page you checked, since Clear all slicers affects the whole report.
- Back does nothing. The page was not opened by drill-through or navigation.
Exercise
A user changes three slicers and expects the visuals to update only after one click. Which action type and slicer setting do you use, and what does Clear all slicers affect compared with that?
Show answer
Use the Apply all slicers action with the slicers set to apply changes through an Apply button (query reduction settings). Clear all slicers is separate. It removes the selections from every slicer on the whole report, not just the current page.