How to build a custom filter pane in Power BI
Updated: Dec 23, 2020
Here we are again, with some amazing visualisation tricks for Power BI. This time I’m going to talk about how you can build a customised filter pane for your report, and fear not, it will look just like the standard one!
“Why would I want to build a filter pane when I have the standard one?” you might be asking… There is a small limitation with the filter pane. Sometimes you want specific filters to be applied only to specific visuals, or you want the filters to not interact with some visuals, or maybe you just want the filters to look different. If you’re using the standard filter pane this might prove to be a bit challenging.
That is why I came up with the idea to build a customised filter pane, to incorporate all those hard requirements, and well, it still looks awesome!
Just a sneak peak of my customised filter pane:
As with my previous post about navigation panes, in this one I use the Buttons + Selection Pane + Bookmarks combination.
Let’s get started!
1) The first thing we are going to do is to make visible the Selection Pane and Bookmarks Pane. To do this go to the View Tab (1) and click on both Bookmarks and Selection (2):
You should now be able to see both panes:
2) Now we just need to start building our filter pane. You can have any design you want! For the filter pane I used a square shape as the pane itself, added a small image as the filter symbol and then just added the filters I wanted to show in my report:
I used the Shadow formatting option to give the popup experience.
For the “back” arrow I used a button and as text I used a Unicode symbol. Don’t know about Unicode symbols? Just check this page (copy paste any symbol, it will work 😉 ):
You can get all different kind of Unicode symbols. A little visualisation trick!
Note: Some visuals might appear to be “on top of each other”. To change this, just change the order of the visuals on the Selection Pane or click in Format and select either Bring Forward/Bring to Front or Send Backward/Sent to Back to change the arrangement:
3) Once you’re done with your filter pane design, it’s time to start organizing our visuals. On the selection pane, select all the visuals belonging to your filter pane by clicking CTRL at the same time you’re selecting them.
Tip: try to name your different visuals properly!
4) The next step is to group these visuals. Click on the three dots in front of any of the selected visuals (1) and choose Group (2):
Rename your new group by double clicking on it:
5) Let’s see some magic happen! Now that we have our custom filter pane visuals all grouped, we can just select if we want it visible or not. Do a little test by clicking on the eye symbol right before the three dots:
Your new filter pane will disappear when you change the option on the selection pane, how cool is that?? Let’s keep it hidden for now as we will start working on the closed version of the pane in the next step.
6) Now that we have our filter pane up and running, let’s work on making a minimised version, the same as we have with the standard filter pane.
We will follow the same logic as for the first part. Just build it on your own design!
I used the same tricks for my design, with a little extra. To change the text orientation to vertical I downloaded a custom visual called “Text Enhancer by MAQ Software”.
7) Now we just need to Group this new elements together, so it forms our minimised filter pane (Please check step 4).
8) All done with your groupings I hope! We are now going to use Bookmarks to tie it all together.
On the selection pane, leave only the minimised filter pane visible:
The visuals on the other group will show with a grey eye symbol as they are hidden.
One the bookmarks pane, click on Add:
On the new bookmark, click on the three dots and uncheck the “Data” option:
By unchecking this option you will guarantee that every time you open or minimise your filter pane, the filters will be correctly applied as this bookmark will only save a snapshot of the visualisations visible. If you leave this option active, every time you click on hide/unhide the customised filter pane, the filters will reset to whatever you had selected at the time you did the bookmark.
9) Let’s do the same thing for the open filter pain version. Hide the minimised filter pain using the Selection Pane (check step 5) and at the same time unhide the Filter Pane Group. Your opened filter pane should show now.
To finish our bookmarks we just need to do the same thing we did in step 8: Add a bookmark and unselect the “Data” option.
You should now have 2 new bookmarks, one for the minimised version, and another one for the opened version.
To test your bookmarks just click on them, they should show and hide the visuals accordingly.
10) The last piece of the custom filter pane puzzle is making our buttons work with our bookmarks.
To do this, click on each of the buttons, and on the formatting options go to Action. Select “Bookmark” and then select the correct bookmark action for the button:
Remember: for the button on the minimised filter pane you should choose the action to open the filter pane and vice versa!
Bookmarks and Selection Pane might be a bit confusing at the beginning. If you’re not familiar with it don’t give up! You will get there fast 😊
If you want to give it a try using my demo, you can download the pbix file from my GitHub account:
Cheers dear Power BI friends!!