Build PRO Slicer pane in Power BI
By: Nikola Ilic
Tags: Data Analysis, Towards Data Science, Data Science, Power Bi, Data Visualization

Build PRO Slicer pane in Power BI

Bring your Power BI report users a whole new experience with a custom-made interactive slicer pane

Photo by Mariana Proenca on Unsplash

One of the things I like most about Power BI are — Bookmarks. For those who are not familiar, Bookmarks are one of the favorite and most used features in Power BI.

Basically, what Bookmark does, it captures the current state of the report, so you can use it for a reference in your actions through buttons, images, shapes, etc. Simply said, this will give you the possibility to create an app-like experience for your report and make it look interactive.

When space becomes a problem…

There are really dozen use cases where you can apply bookmarking, but I will focus here on a specific problem: I would say it’s a frequent issue and I assure you that sooner rather than later you will face this problem during the report designing process.

So, we created our nice little Power BI report, everything looks fine, we have our 3–4 slicers on the page, so far, so good. But, one day our users want to have an additional slicer for, let’s say, brand category. No problem, I will make existing slicers smaller and secure a space for the new one. Then, after a month or two, our users want to have one more slicer, than after another month or two, one more, etc. I think you get the point…

So, what should we do when we can’t accommodate all requested slicers on our report page? The first option is to tell our users to choose which ones are the most important for them and then to discard others…Just kidding, of course, you shouldn’t do that:).

We can create a separate report page that will contain slicers only? Or…we can create a slicer pane, which will hold all of our slicers on the existing report page…And we will be able to show or hide this slicer pane, depending on the user’s choice.

As a bonus, we will give our users an option to reset all the slicers with one click!

Building from the scratch

Here is how my report canvas looks like in the beginning:

The first thing I’m going to do is to turn on Bookmarks Pane and Selection Pane under the View tab, so I can take full control of manipulating different objects within the report.

As you see, we haven’t created any bookmarks so far, but shortly and we will do.

The only “strange” item on the report canvas you can notice is the filter icon in the upper left corner. That icon will be used to open a slicer pane we are going to build.

The next step is to create all necessary slicers for the report. I’ve created 8 different slicers, based on users’ request. In case you need to display all selected slicers in your report, please refer to this article.

Finally, I’ll add a nice rectangle shape, which will serve as a pane for all of my slicers, and an icon for closing the slicer pane.

Now we have all our elements on the report page, so the next step is to define the visibility of specific items within the bookmarks, and to define actions for navigating through the bookmarks.

As we have all our elements on the canvas, let’s first create a bookmark which will capture the current state of the page:

I clicked on Add and named my bookmark Slicer Pane Expanded. The most important thing is to uncheck the Data option (click on three dots to open this menu) so that we can be sure that slicers aren’t reset when users switch between the bookmarks.

Now, let’s set the Action property of our filter icon, so we can specify what do we want it to do:

By doing this, we instructed our icon to navigate us to the report state captured by the Slicer Pane Expanded bookmark.

Now, let’s set the state when the slicer pane is collapsed. First, I’ll hide all items related to the slicer pane in Selection:

I can now create a new bookmark, called Slicer Pane Collapsed, using the same rules as in the previous step:

One important remark from my side regarding the Selection pane: by dragging elements up and down, you are defining the order of visibility on the report page! That means if the rectangle shape which serves as a slicer pane is above our slicers in the Selection pane, and the rectangle is not transparent, it will cover our slicers and they will not be visible. So, make sure that you define the right order of elements here.

Once I do CTRL + click on our filter icon, look what happens:

Our slicer pane is there! And I can select whatever values I want in my slicers, they will be propagated to visuals “behind”. One last thing to configure here is to define an action for an icon for closing the slicer pane:

And now, let’s check how it works in reality:

Awesome, isn’t it?

Bonus tip — Reset all filters with one click!

Now, the final touch to make our users even happier…It would be quite cumbersome when someone chooses 8 different values in 8 different slicers to go back to the default selection. One would have to click one by one slicer and clear the selection.

So, let’s help our users with this! First, I will put a blank button within our newly created Slicer pane. I’ve formatted the button to look nicer and to “tell” our users what is it about — I think that “Reset All” is self-explanatory here.

Now, let’s create another bookmark, which we’ll call Slicer Pane Reset. Apply the same steps as previously, but don’t uncheck the Data option! This will capture the current state of the page (including all the selections within slicers), so once we navigate to this state via a bookmark, it will also “transfer” the captured data state (in our case, it’s the state where all slicers are reset to default):

Once again, let’s check if everything works as expected:

Absolutely perfect!

Conclusion

As you witnessed, we pushed the filtering experience to a whole new level, using bookmarks in our report. Your users will love you — you supplied all slicers they wanted, but you also saved space on your report to accommodate more visuals or to give existing ones a little more space.

Subscribe here to get more insightful data articles.