Filters and Slicers in Power BI
A free video tutorial from Kirill Eremenko
4.5 instructor rating • 44 courses • 1,750,216 students
Learn more from the full coursePower BI A-Z: Hands-On Power BI Training For Data Science!
Learn Microsoft Power BI for Data Science and Data Analytics. Build visualizations and BI reports with Power BI Desktop
04:21:06 of on-demand video • Updated April 2021
- Connect Microsoft Power BI to data sources
- Create Barcharts
- Create Treemaps
- Create Donut Charts
- Create Waterfall Diagrams
- Create Piecharts
English [Auto] Hello and welcome back to the course on power be-I in the previous tutorial we finalized our wonderful and amazing looking area chart or a stack to enrich our to be more precise. And today we're going to talk about filters and slicers in power. Very interesting lecture. So let's have a look. We've got our Richard here we are talking about different age groups of color and we can highlight them actually what was something I noticed before we proceed I noticed that we've got two colors of the same two of them are same had the same color black. They go ahead and change that we were you know hard work of colors. Let's go into different colors and let's say let's make this one purple this lower one the one that's towards the bottom right now it's this one just looks similar. There are different colors but they look similar. Some purple maybe. Is there a darker purple you can change custom colors. You know I like that so I know that these two look this is similar as well so I'll play around with the colors and pick something that you prefer that you like because science is not just about finding the insides and the lyrics also about being an artist and finding wonderful colors that help you represent your insights in the most engaging and convincing way. So there we go. Let's make it a bit darker. Too close to blue. All right so you're going to keep going on for a while I'm just going to select a green that I like. There we go. That'll do. All right. So today filter's right. So we have different colors which we can highlight. I was auditioned with and we can just like we can tell by the college and which one is which. And it's good that you know they come in order so 16 to 19 20 24 and so on. And it's it just makes sense right. No. How can we add for example gender. How can we change this resolution quickly if and look at it for males and females separately. Well we could recreate the same one and just have one for a male one for female. Right. But what we can do is we can add a filter we can just take gender and so at the bottom here in your words fields tab you have an option called filters. Right. And here you already have the items that you added by default you've got age you've got period and you've got an employer. And here you can change these filters here but we're not going to do that right now we're going to take gender and we're going to drag it into filter. Right. So in fact you can just you can just move these drop downs actually you remove the existing ones because they're part of the visualization but what you can do is now you can just look at gender. And here you can specify which one you want to look at you want to look at men. There's your vision or you can look at women and then you put that in. So you can do some advanced filtering and this is like more applicable to when you have lots of different items in there. Then you might want to look at some it's whether you're item or whether your calorie contains or word or stars for letter and things like that. Then you can add additional conditions there but we're not going to do that. That is something something more advanced you can do. And again that's for large took care of all variables with more categories than just two. So we're just going to stick to the basic filtering. And basically you can just use Alsation So if you want of those four men that you might keep it like this and then you might duplicate your tab and do another one just for it. And in this case residuum keep it on select all or if you unselect that's the same thing. So that's that's a handy approach something. Good to know about something you can do with age you can just select certain age groups that you want to visualize and then just keep your resolution at that. And it's kind of like hard coding that into the resolution as you can and adjust that you can totally just change it whenever you whenever you want to. But the next approach on it's a bit more flexible. So that's filtering in part B. And always good to keep that in mind that you can you know control your resolution like that. Now we're going to look at slicing So let's go ahead and duplicate this page and we just call this page 2. And so it is a great idea to duplicate your pages when you want to add something and you're not sure if it's going to be better or worse just duplicate the page and experiment on the new page and then you have the old one as a copy. So we're going to reduce the size and now we're going to do something that we've never done before something you know we're going to add a another result zation onto this same workspace. This is a beautiful thing in power either. It's very simple to add more than one is onto one onto your workspace. Well you have to do is just make sure you're not you haven't selected this position so just click somewhere in the blank area on the workspace and then select a resolution you like and in this case we're going to start small. We're going to just start by adding a slicer because that's the topic of today's tutorial. So just go ahead and click on the slice or we hear and what the slicer does is it's like a filter but it's a visual filter it's not something that is you know some way here hidden in the parameters. It's something that is like very obvious straining of his position and it's easy to control and that's why I mentioned that when we were doing the filtering here we're kind of like hard coding the filters. Whereas with slicers they're right right away they're right so there on the his position and very very evident very easy to control. So let's go ahead and with this slicer adds the same apartment that we were talking about will to add gender so you enter into a slicer as you can see it automatically decides what it should look like. And now without having to configure anything at all only all you can is it's all ready. All you have to do now is just select which gender you would like to visualize and it's like that had all magically adjusted chart. It's like that automatic there just to check if you want to slow all. Just uncheck that and there you go. It's so active that you can also press is Button are here clear selections and will automatically bring back your full charge. And again you can add another slicers so click on the whitespace to click anywhere not on these two at a slicer and this time let's say you want gender not just touch in your own age. And here you can just like the ones that you want so if you want to select one just select selected if you want to select several Then hold on control and on the keyboard and you select the ones you want. And then you go so that's a very handy way to quickly control it was all zation with slicers. And moreover power I recently released an update. Now slicers look really good with dates even. So let's add another slicer and this time drive period into here. And as you can see here you've got a wonderful slicer where you can just scroll around and look at the data watch how beautiful this is. This is amazing. This is just incredible how life it just looks really natural and integrated. You see like adjusting and it's changing so if I want to cut it off here and see what what is happening until 2010 so I can see that there was a climb like that or I can visualize what was happening after. And by the way you have options here so you can click the drop down and you can see in of between you can say before. So you can look at everything that happened before and it removes that first part. When can you ever see that happen after you can do a list of actual elements from your dataset and just select them like that. But that's probably not the best idea of dates between is probably the best option here. And you can specify the date hardcoded in or you can choose from a calendar. How cool is that you can actually. It's like the dates so you don't have to hard code things and you can specify. So you don't have to type it in manually you just go through this calendar and find whoops find the date that you want and let's go back a bit. So to specify the date and all are just like that. So there we go. Or you can just clear section very very handy tools these slicers and they make your session very friendly very user friendly for adjusting. So hopefully in today's tutorial and help clear on that see what inside's you can derive from by using these different just slicers that we've created. And I look forward to seeing you next time. Until then happy analyzing.