Create a Power BI Slicer Panel

There is nothing worse than having a Power BI report that has 50% of the space taken up with slicers.  When this happens, you only get half the page to visualise the actual data.  But on the flip side, if you don’t have the slicers it can be harder for the report users to filter the data they want to see.  Many users don’t like using the built in filter pane on the right hand side.  All is not lost – there is a great way that you can have the best of both worlds by creating a collapsible slicer pane that you can show and hide on demand.

Now I didn’t invent this concept – I learnt it from looking at what others have done, such as Amanda Cofsky, Miguel Myers, Mike and Seth from http://powerbi.tips and also Adam and Patrick from GuyInACube.  There are lots of great resources out there to learn tricks like this, so you should check those out.

You can see one simple interpretation of this solution below. The user can hide and collapse the slicer pane by using the arrow keys (#1 and #2 below).

Creating a Slicer Pane

There are many ways to create a Slicer Pane to have the look and feel you want. In this article I will show you a basic version  without too much bling, just to cover the concept, but you can use your imagination to extend the concepts further as you prefer. I am using an Adventure Works database with a simply report for the illustrations.

Step 1: Create a Placeholder for Your Slicers

Place a text box as shown below. I used a text box rather than a square shape as I had more granular control over the border size and colour than the shape object.  I turned on the border for the text box and also added a shadow  effect.  To add a shadow, I duplicated the text box, offset the new text box to the right and below, turned off the border, positioned the new text box behind the original and set the colour to grey and the transparency to 80%.  I got this tip from Reid Havens.

Once I had the expanded slicer pane configured, I added the slicers and resized them to fit in the pane. I have placed slicers for Products[Category] and Calendar[Year].  Of course there is a lot more room and in reality you could add a lot more slicers to the pane.

You may have to reorder the visuals so that the text box and the slicers are all visible. You can reorder the list of visuals by navigating to the view menu (#1 below) and turning on the selection pane (#2).  In the selection pane itself (#3) you can move the visual objects up and down the list using drag and drop to to control which object sits on top of which other objects.

Step 2: Add a Navigation Button to Hide Slicer Pane

Add a left arrow button by selecting buttons (#1 below), left arrow (#2).  Position and size it (#3) and put it on top in selection pane (#4) by dragging it to the top of the list on the right.

Step 3: Add a Navigation Button to Show Slicer Pane

Before moving on to the next step, I needed to first hide the objects that make up the new slicer pane (the text box, slicers and left arrow button) from view in the selection pane (#1 below).  To do this, I just clicked on the eyeball next to each item that needed to be hidden.

Now that the slicer pane is not visible, I added a right arrow button and positioned and sized it as shown below. I turned on the border for the right arrow button as you can see in #2 below.

Step 4: Add Bookmarks

The next step is to add bookmarks that enable you to toggle between the views. Click on the bookmarks pane (#1 below) under the view tab.

First I configured the bookmark with the slicers pane hidden in the selection pane (#2 below).  I added a bookmark (#3 below) and renamed it as “Slicers Hidden” (#4 below). By default, bookmarks will save the slicer filters as a part of the bookmark.  This is not what is required in this case – I don’t want the bookmark to return the slicer filters back to where they were when the bookmark was created – instead I want the bookmark to ignore the slicer filter settings all together.  To fix this, I unchecked the Data option (#5 below) from the bookmark options (ellipsis…) and then clicked on Update (#6 below).

Next I had to set up the view that has the slicers visible in the selection pane (#1 below).  To do this I toggled the visibility of the items to show the ones needed.  I added a bookmark (#2 below) and renamed it as “Slicers Visible” (#3 below). Then as before, I unchecked Data (#4 below) under bookmark options for this bookmark, then I clicked on Update (#5 below).

You can test the bookmarks by clicking on them in the bookmarks pane on the right. If you click on “Slicers Visible” the slicers will be displayed and if you click on “Slicers Hidden” the slicers will not be visible.

Step 5: Assign Bookmarks to the Buttons

This is the last step. You need to assign the two bookmarks to the right arrow and left arrow buttons added.

Select the right arrow button (#1 below), turn action on (#2 below), select type (#3 below) as bookmark and select bookmark (#4 below) as slicers visible.

Next select the left arrow button (#1 below), turn action on (#2 below), select type (#3 below) as bookmark and select bookmark (#4 below) as slicers hidden.

With these changes, the slicer panel is ready and you can test it using the arrow buttons. Remember that you need to use Ctrl+click to use the new buttons when using Power BI Desktop. After publishing to powerbi.com you can simply click the buttons without holding Ctrl.

You can view the Slicer Pane deployed in a real world scenario here.

Watch the Video

Here is the YouTube video where I have shown how to create a Slicer Panel in Power BI.

Share?

Comments

  1. Hi Matt, very helpful tip! Do you know if the bookmark features needed are available in the on-prem PBI Reporting Server?

  2. This is a great step by step, I have used this for some time now, and my only problem with it is the amount of time it takes to create (Not that it takes that long to be honest but it would be quicker). It would be great if we had more over the bookmarks, or at least be able to assign a bookmark to an “Active” page. Another thing that would be helpful is the ability to group visuals.

  3. Interesting technique.
    I’m still learning about PivotTables and using them in Dashboards, through native
    I have had a opportunity to play with PowerBI. But I know essentially nothing about PowerBI.

    So the question is, can this technique, hiding slicers (or other elements) be recreated in Excel itself?

  4. Interesting technique. This is a feature that Microsoft should incorporate and/or make the existing filter panel more flexible from the designer’s perspective

  5. Hey,
    How did you highlight several of objects?
    at the beginning of the video, you had a different example and you highlighted all the filters.
    Thanks

  6. Hi Yagel, if you want to highlight a specific visual on the report page, select “Spotlight” on the top-right corner of the visual. Then that visual gets highlighted and the rest of the visuals on the page get dimmed.
    If you click on a specific field in a visual, then in all the visuals on the report page that field gets highlighted. This is what is called highlighting in Power BI.
    I think your question is about the options in the slicers. You will get that effect when you select the Font color as “Black” and Font family as “Arial Black” for “Items” in the Format pane for the slicer.

  7. Or do you mean “how did I select more than 1 item in a single slicer?” To do this, just hold Ctrl and click.

  8. Thank you for your answer.
    what I meant is when you unhide your left margin with the filters, the rest of the page faded away – left of the page look like it’s “spotlight” in contrast to the rest of the page.
    I had an idea (and I imagine you did the same) I added another object on top of the rest of the page (when i uncover the filters) that was in transparency = 50% and make you feel like all the filters are in spotlight mode and the rest of the page is faded 😉

  9. Ok, sorry – yes you are right. The problem (I find) with spotlight is you can’t seem to have any other button or object visible. This means it cannot work with buttons as you can’t have spotlight and another button for a “close” bookmark. So yes, I use a text box with transparency as part of the solution as you suggested.

  10. Great little Technique Matt.
    I wanted to use it across several pages of my reports keeping the slicers synced at all time but I faced some issues as the bookmark was always bringing me back to my first page…
    While not ideal here was my workaround:
    – setup the text box and slicers using your method
    – duplicate the page
    – remove the two buttons and create two new ones
    – create two additional bookmarks for the second page
    – follow your method to assign the two new bookmarks to the new buttons.

    Not ideal as you get 2 bookmarks/buttons per page, you have to set each page individually and the visible/hidden status isn’t in sync from one page to the other but it worked and it keeps it user friendly when sharing the report.

    Do you see another way to achieve the same without creating additional bookmarks and buttons?

  11. i like your approach. I have seen people have a single slicer page as the first page of a pbix file as the single master filter page. Perhaps you could do that. On each report page you have a slicer button. Each button takes you to the slicer page but with a different bookmark ( same page but different back button to take you back to the correct report page). You could even make this look like a side panel by adding a blurred background proxy for a report – you won’t see the details anyway. Would that work?

  12. Hello Matt,

    1st i want to thank you for sharing this with Us, this really helping me to get more space for my visuals.

    I have one problem, i have already bookmark for 3 different things in one tab and once i added this new slicers panel it automatically reset the graphs to the standard not working with the one selected by the other bookmark action, lets say i am using bookmark to see the performance for 3 employees each one separately and now adding another bookmark with slicers for date, city and Country .. whenever i click the key to get the slicer panel, it resets the other graphs to the employee i was selecting while creating the slicer panel bookmark .. so you have to work with the slicers 1st and then select the employee which just hiding the slicer panel without reset the slicers

  13. Is there a way to update the bookmark when you ‘hide’ the pane?
    When I press the hide button, it resets my slicer changes because it is going back to the bookmark before I made the slicer changes.
    It seems like the slicer pane needs to be open the entire time while changing the filters (which isn’t a big deal, I can just squish my reports over a bit if the user wants to use slicers)

  14. Great tips. Thanks. Is there a way to make the visuals stretch or contract based on which button is clicked? What I mean is when the user clicks button to hide slicers textbox, the visuals are stretched, and when button show slicers textbox the visuals are reduced?

  15. I noticed that when you click the arrow that hides Textbox with Slicers, all data is reset, in other words, you loose all your filter selections. Is this a Power BI bug? I am using Power BI Destkopt x64 Aug 2018 and Power BI Report Server Aug 2018.

  16. Love it – ultra clear instructions and big gains of space, works well (although some work required with synced slicers as mentioned in comments).
    Head did go into hands on unresponsive “bookmark” button until I noted your “use Ctrl+click … when using Power BI Desktop” – hey Microsoft, how could we not remember that trick for everything… 😉 Fortunately it’s not needed once published through powerbi.com portal where it all works perfectly!

  17. Thanks Matt – this is a great user experience while saving room on the canvas. I used this technique for a report, where I have multiple bookmarks that are set to display different visualizations per each bookmark. My question, is how do you maintain the same visualizations the user was using when you click Slicers Hidden or Slicers Visible? As of now, when they click Slicers Hidden or Slicers Visible, it resets the visuals back to the default set of visuals.

Leave a Reply

Your email address will not be published. Required fields are marked *

Ten Things I Wish I Knew When I Started With Power Pivot.   Learn  Without The Pain!

x