Last week, I spent one very unproductive hour trying to figure out how to turn a slicer into a drop-down list. It wasn’t pretty. It also wasn’t intuitive. My mission today is to spare you the agony and humiliation of fumbling around with your slicer like I did.
For this exercise, we’re using Power BI Desktop (highly recommended) and the World Wide Importers sample database. Off we go!
First up, let’s discuss what a slicer does. It provides a way for your end user to filter a Power BI report or dashboard on the fly. It’s visual and intuitive, and it will affect everything on the screen.
For example, slicing on Package Type will affect Quantity and Unit Price.
Nifty, yes? So, let’s figure out how to make your slicer so, so pretty.
Step 1: Add a slicer.
Step 1a: Make sure you don’t have any other things selected.
Step 1b: Click on the slicer icon.
Step 1c: You’ll get a blank slicer like this:
Step 1d: Choose the value that you want to slice on. By checking the box in your list of fields, you’re putting that value in the “Field” property of the slicer.
VERY IMPORTANT ASIDE:
For your slicer to slice, you’ll need a relationship between the table you’re pulling your slicer from and the tables containing the measures you want to display. In this example, there is a foreign key relationship between Sales.OrderLines, which contains Quantity, and Warehouse.PackageTypes, which contains PackageTypeName. This is a topic for another time, but know that the modeling functionality in Power BI gives you the ability to inherit the relationships already existing in a database or to modify/create your own within Power BI desktop.
Congratulations! If you’ve followed Steps 1a – 1d, you have a slicer.
Step 2: Turn the slicer into a drop-down list.
Step 2a: Click on the thing that looks like a roller brush for painting.
Step 2b: Make sure that the Header is on. This is the “This isn’t very intuitive, is it?” portion of the process.
Step 2c: Now, go back to your slicer and hover over this spot right here…
A little context menu will pop up…
Step 2d: Choose “Dropdown”. Now you should have this:
Congratulations! You have turned your slicer into a drop-down list.
Step 3: Get rid of the Header and add a Title.
The header will be exactly what the column name is. It probably isn’t pretty or user friendly. Instead, let’s add a title.
Step 3a: Turn the Header off.
This is the part that tripped me up so badly. The first thing I did when I added the slicer was, wait for it… remove the header! Then, I didn’t have the context menu for Dropdown or List. Because maybe it’s all part of the same thing? I’m not sure what’s even real anymore.
Step 3b: Turn the Title on and expand the menu.
Step 3c: Customize to your heart’s content. Add a title. Choose the text justification. Modify font size. Change the font color. Whatever makes you and your drop-down slicer happy.
Your drop-downed slicer:
Extra Credit: Play around with the other customization options. You can add a Select All option. You can play with the fonts and colors and backgrounds and borders.