Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
It is so nice that we, the report developers, have the ability to pick from multiple slicers.
Slicer menu
It is not so nice that our end users do not have that luxury. They are simply out of luck.
Slicer menu missing once published
What if there was a fairly easy way to give them the power? This article will show you how you can build menus for your slicer so that it looks and functions just like the real deal. This tutorial assumes you already have a slicer built with information loaded into the slicer. So, you will only see the slicer in the example.
Before we begin, I am making the assumption that you already have a slicer on a report and it is located in the positon on your report where you no longer are moving it around. If this is not the case you want to start preparing by loading a report with a slicer you want to build this for or create a new report with a slicer.
First we will turn on the Bookmarks and Selection Panes. To do this simply click on View and select the Bookmarks and Selection Panes. Since I only have one (1) visual all that is shown in the Selection pane is Slicer. If you have multiple slicers on your report then you will want to rename them to more descriptive names in order to find the slicer easier.
Changed Name Original Name
Here is the list of operations to perform:
If you're looking to create a menu which is identical from the original take a moment to view the original. Also make note of all of the options you are looking to recreate.
Looking at the original you will see that icon is a V. We cannot get the exact icon so for this I used a Cheveron Arrow (feel free to use what you would like and skip the rest of the Menu Icon formatting steps below).
To create the Slicer Menu:
Rectangle before resizing
The menu will open in front of your rectangle. Use this as a guide to get the rectangle down to the exact height and width as the original. It does not have to be perfect.
Rectangle behind original menu. Notice the blue in the left bottom corner.
Without the original menu opened.
With everything lined up and sized we can remove the background color.
Beneath the fill section is the border section.
#E6E6E6
Still within the border section.
It is time to create the fields. The fields are created using the blank button element.
For now, just create one (1).
Turn on Text;
The other padding should remain 4 px.
At the top of the Style section you will see the option Apply settings to.
#118DFF
This emulates the same action we see when we hover over the fields of the original (the field background turns blue and the text font turns white).
Now, select all of the fields and move them into the menu base. Organize them however you would like. Make sure that the size of the field is not longer than the menu base. If the field is longer then shorter the width so that it fits inside the base.
All fields inside the base
Now that we have our menu completed our next step is to group all the menu base objects. Select all the objects that make up the slicer menu. The only exception is we do not want to select the menu icon. Just the items the make up the menu. There are a bunch of different ways to select all the items. One (1) way is by navigating to the Selection Pane then click on the first object needed. Find the next object needed and hover your mouse cursor over it. On your keyboard, hold down the Shift key then left click on the object. Repeat this for the remaining objects.
There are also multiple ways to group the objects. One (1) way is to click on Format on the top ribbon, click Group, then click Group (in the submenu).
Now our objects are grouped together. You can change the name of the group in the Selection pane if you want to have everything labeled properly. However, it is not requiried.
Caret next to Slicer Menu shows you that the objects are grouped.
To begin setting up the bookmark we need to add actions to each field so that when the field is clicked it changes the view of the slicer. Currently the menu is opened so we will begin by creating that view. Start by selecting the Slicer menu group and the Slicer icon from the Selection pane.
Why did we change the selection from all visuals to selected? This is done so that when the user clicks the icon the only change we will see is the menu appearing. If we left it with all visuals any time we are on a slicer view that isn't the default view and we click the icon it will revert the view back to default. For instance if I have the slicer set to List but my default view is Between, click the menu icon, then the menu will load and revert the slicer to the Between view.
Without changing the selection this results in the entire view change back to the default view.
To create the next bookmark:
Make sure you are not clicking on the icon we created but the original menu button.
Once you've added all your bookmarks to your Bookmarks pane we can move forward to loading the actions. The order of which
you load first does not matter. I am starting with the Slicer icon.
Follow these steps to set the action for each of your field objects till all are complete.
The entire setup is complete. Now it is time to test out the slicer.
With this tutorial you learned how you can create a slicer selector to allow your users the freedom to select what type of slicer is available. Hopefully this is something that can be implemented in the future but until then I hope this helps. Here are some ideas posted you can vote up so we can get this added.
Microsoft Idea · Allow Users to Change Date Slicer Type (powerbi.com)
Microsoft Idea · Allow date slicer type change without edit permission (powerbi.com)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.