Locked lesson.
About this lesson
When the default visuals are not inspiring, or you just need to use a visual that Microsoft doesn’t supply by default, you can often find another version in the Custom Visual store. In this module we will look at the Chiclet Slicer, a vast improvement over Power BI's native Slicer visual.
Exercise files
Download this lesson’s related exercise files. You can download the source data files for the course from the resources section of your Lessons page.
Custom Visuals - Chiclet Slicer.pbix449.5 KB Custom Visuals - Chiclet Slicer - Completed.pbix
602.7 KB
Quick reference
Custom Visuals - Chiclet Slicer
Working with custom visuals in Power BI.
When to use
When the default visuals are not inspiring, or you just need to use a visual that Microsoft doesn’t supply by default, you can often find another version in the Custom Visual store.
Instructions
Locating Custom Visuals
- Go to Home -> Custom Visuals -> From Store
- Enter a search term and hit enter
- Choose Add to add a custom visual into your project
A better slicer – the Chiclet slicer
- Search for Chiclet Slicer in the store and install it
- Add the field you wish to slice by the visuals Category field
- Note that multi select is accomplished by holding down the CTRL key
- Options for configuring the slicer can be found under the paintbrush icon
Adding images to the Chiclet Slicer
In order to use images in the Chiclet Slicer, they must live on the web. In addition, you must have the URL in the data table in Power BI. Once you do:
- Go to the Data view and select the table that holds the image URLs
- Select the column -> Modeling -> Data Category -> Image URL
- Return to the visual
- Drag the field with the image URLs into the Image field
- Add a numeric field into the Values area
Hints & tips
- There are many other custom visuals in the gallery including other slicers and charts.
- Like any slicer, the chiclet slicer filters stick and add to the filter context in addition to any selection in another visual.
- 00:04 In this video, we're going to look at slicers,
- 00:07 which is another way to actually be able to cross filter your reports.
- 00:11 The slicer visual is this one over here, with a little filter on it.
- 00:15 And when we click on it, we'll get another little visual that we can throw on the top
- 00:19 right-hand corner here, and I'm gonna put the location name on it.
- 00:22 And then just size it down a little bit better.
- 00:25 Now I'm not a big fan of slicers.
- 00:27 They're not the most pretty looking visual here.
- 00:30 It kinda looks like a little bit of chat box.
- 00:31 I mean they work well.
- 00:32 When you click on ethical development, it'll cross filter other reports.
- 00:36 If I hold down my Ctrl key and click on Tax Evader, you'll notice that it actually
- 00:39 adds that to the filter context as well so they're both there.
- 00:43 But what's neat about slicers is when you actually click on another visual,
- 00:46 those slicer filter contents do not disappear.
- 00:49 They now layer on.
- 00:50 So I'm now filtered down so
- 00:52 that the squints location is not showing as well filtering into wine.
- 00:56 That's something you can't do with a normal custom visual because those
- 00:59 custom visuals will toss any other filters and
- 01:01 reset, whereas with slicers they stick around.
- 01:04 Regardless I'm just gonna unfilter this guy here and go back and
- 01:07 look at the slicer a little bit more.
- 01:10 One of the challenges with slicers here is to say they're not very attractive.
- 01:14 When I go and click on the Format Paintbrush you'd think I have
- 01:17 some options to really change this up and
- 01:19 make it look a lot better, but there really isn't a lot.
- 01:22 When I go under the General Options, I can change the orientation to horizontal and
- 01:27 that will allow them to look more like these big blocky boxes,
- 01:31 I could clear this by hitting on the little eraser icon here.
- 01:35 But here's what happens when you start to actually shrink this guy down.
- 01:39 Notice how we get an arrow so now we have to scroll across.
- 01:42 It's not as robust as the old Excel slicer where you can actually see lots of little
- 01:46 bubbles and you can control how many do you want to see on each row or column.
- 01:50 For that reason, I'm gonna go and delete the slicer.
- 01:53 You see there's a better slicer, but the problem is it's not built into Power BI.
- 01:57 You have to go get it.
- 01:59 Where do you get it?
- 01:59 You get it from the store.
- 02:01 This is a custom visual is what we're looking at here.
- 02:05 Now you'll notice the custom visual gallery, if I go and I search for
- 02:08 slicer, there are a bunch of different slicers.
- 02:11 These are all little ones that can be pulled into your project and
- 02:14 actually work with.
- 02:15 And it will work just fine when you distribute them to the Web or
- 02:18 whatever you wanna do with them.
- 02:20 Now I'm going to pick up this Chiclet Slicer.
- 02:21 You'll notice it only has two stars out of five.
- 02:23 That's cuz most people actually don't know how to use it.
- 02:26 Lets go click Add, and
- 02:27 you'll notice that it tells me that it was successfully added into the report.
- 02:31 There we are.
- 02:32 And I now have my little Chiclet Slicer.
- 02:34 So I'm gonna go click on that and choose location name.
- 02:38 Now you'll notice that the slicer that we actually get now looks a little bit
- 02:42 more akin to what we saw in the old Excel slicers where we have nice little bubbles.
- 02:46 And once again, if I click on it, it will filter nicely.
- 02:49 I can hold down my Ctrl, click into something else, and it works exactly
- 02:53 like the other slicer in that it layers onto the other visuals that we have here.
- 02:58 Now these slicers are particularly cool because we actually have the ability to do
- 03:02 a lot more formatting with them.
- 03:04 If I click on the Format Painter here, you'll notice that we have the ability to
- 03:08 go in and we can change how many buttons do we wanna see in each column.
- 03:11 So I can change that to two.
- 03:13 I can go and you'll notice that this automatically changes here.
- 03:17 I have the ability to control the colors and change vertical locations and
- 03:21 all kinds of things.
- 03:22 So if I go under Chiclets here, you'll see that I can change the size of the actual
- 03:26 Chiclets themselves, and I can change what is the selected color.
- 03:29 Maybe I wanna change that to a yellow.
- 03:32 And I can change all kinds of other little aspects about this as well.
- 03:35 One thing that's kinda cool about this slicer,
- 03:37 though, is that you have the ability in here to also use an image.
- 03:43 Now the challenge for that is that we need to provide an image.
- 03:47 But the image needs to come from a URL.
- 03:49 It needs to be hosted on the Web.
- 03:51 So I'm gonna go back and quickly we're gonna build an example here.
- 03:55 I'm gonna copy this stuff off of page 2.
- 03:58 We're gonna go back into Edit Queries because we happen to have the ability to
- 04:02 build this information right now.
- 04:04 So, if I go back to the Locations table, you'll notice I have my location names.
- 04:08 I'm going to go to Add Column, add a custom call.
- 04:12 In this custom call, I'm gonna go and call, let's call it picture.
- 04:19 This is gonna be based on, and I'm wrapping this in quotes,
- 04:24 the base URL for where this image is and the location name.
- 04:30 And, ".png".
- 04:34 And this will give me the basis for forming the URL that I need where
- 04:37 we've actually stored some images for this purpose.
- 04:41 Now you'll notice that we've got these particular images.
- 04:43 If I click on the link itself, you'll see that it's got a mixture of, well,
- 04:48 most of it's lowercase, but we've got a little bit of uppercase in here, and
- 04:50 we've got some spaces.
- 04:51 Now I can't have any spaces in this because the URL doesn't have
- 04:54 a space in it.
- 04:54 So I'm gonna right-click on this and we're gonna replace values.
- 04:57 And we're gonna replace a single space with nothing, which will change this out.
- 05:02 So that now it's all been merged together, and
- 05:05 I'm also gonna right-click and I'm gonna transform this to lowercase.
- 05:09 So this will give me some nice URLs that look nice, all consistent,
- 05:13 all the way through, perfect for each location.
- 05:17 I'm now going to say home, close and apply.
- 05:22 We're gonna go back to page one here, and we're gonna go select our slicer.
- 05:26 And at this point,
- 05:27 what I'm gonna do is I'm gonna go back to my Locations table and
- 05:30 we'll notice that we now have our picture, which I'm gonna drag into the image area.
- 05:35 And nothing happens.
- 05:36 Our slicer still looks the same.
- 05:38 And this is the secret, is we need something in the values area.
- 05:41 So let's try the same thing.
- 05:42 Can we put the same field in here?
- 05:45 How about that?
- 05:45 And look at this.
- 05:46 Right away we get a nice big picture set for our slicers.
- 05:51 Now they're a little bit too big here.
- 05:53 So what I'm gonna do is I'm actually gonna go back and
- 05:56 change the General on this guy here.
- 05:58 We're gonna put this one with three items per column.
- 06:03 Maybe I'll make it a little bit bigger in order to see what's going on.
- 06:07 So the scaling and sizing of it isn't the greatest with this particular tool here.
- 06:11 We can try and scroll it up, but
- 06:12 it doesn't really work as well that way as we might like.
- 06:15 And you can try and play around with these things.
- 06:17 I found that the sizing of these things is a little bit tough.
- 06:19 But with a little work moving some of the visuals around and tweaking some of
- 06:23 the components of the slice here, you can see that you can make it look quite nice.
- 06:27 Some of the things that I did in order to make this work, I turned off the header.
- 06:30 I changed the height of the individual Chiclets to 100 here just to make them
- 06:34 a little bit shorter.
- 06:36 And I ended up going through as well and
- 06:37 playing around with the actual image size for the images themselves.
- 06:41 Setting them up and down until I could get it working into a place where I thought
- 06:45 that it looked just perfect.
- 06:46 So now I've got something that looks pretty nice.
- 06:49 And it can be used very quickly to go and filter my dashboard in a nice and
- 06:52 intuitive and engaging way for my users.
Lesson notes are only available for subscribers.