Slicers And Card
- 05:23
Working with Slicers and Cards.
Glossary
Card Data Visualization Filter Slicer TotalsTranscript
Slicers and Cards Power BI has a wide range of chart types to choose from column and bar charts, pie charts, and also slicer visuals and card visuals.
Let's have a look at slicers and what they can do.
Slicers act as a filter on our page so we can choose to filter our data by a currency field, a year field, or lots of other ways as well.
All the visuals on the page will automatically update once that filters applied and it's a really good way to set up an interactive dashboard to help explore the trends and patterns for yourself. We can also apply as many slices as we want to the page.
When we use the slicer visual on a page, for example, we could have a column chart and a slicer then that allows us to choose the currency. So selecting a different currency code each time will update the column chart immediately so we can explore how the totals differ depending on the currency being used.
Slicers can be formatted in lots of interesting ways so they can be list or tiled.
They can appear as a drop-down which is really good if you don't have that much space on the page.
And if you work with a date field then a slicer can act as a timeline.
Another really useful visual is a card, cards are great to display key numbers and statistics on a page.
We can perform a range of calculations such as sum, average, or count and it's quite common to use multiple cards on a page to highlight lots of different key statistics.
And they interact with slicers, so again, if we select a value from a slicer the card will filter automatically.
Let's do a workout and see how to create slicers and cards in Power BI.
In my Power BI report I'm just going to connect to an Excel workbook going to take module four lesson one work out workbook here.
And I'll select the worksheet from here, so L1 assets and load that into my report.
So the first thing I'm going to do is just create a column chart and then we can add a slicer to see how it interacts.
So I'll just choose the asset class L1 field here.
And I also add in the market value field, there we go.
And I'll change it here to a clustered column chart.
And just make a little bigger in the page.
Okay, so now I'm going to add a slicer in so I'll click on to the canvas and just use the slicer icon here in my visualizations pane, I'll click once to add a slicer and the field that is going into my slicer is the field I want to filter by. In this case, it's my normal currency. So if I click on that we can see now I have all the different currencies listed in my slicer and it works immediately. If I select GBP you'll see the column chart now updates It is filtered to only use the rows of data which have GBP.
We can clear our slicer just by clicking up here on the clear selections icon and it's back to using all the data.
There's a tiny little arrow up at the top right as well and if I click on that I can change it to drop down. Again if I've not a lot of space on the page, it's quite useful I can just click in there and choose from the list that way.
Just going to change it back there to list.
And open it out again.
We can also go to the formatting page, formatting section and in here we can go to slicer settings and change the orientation to horizontal. Now, we can only do this if it's a list style not a drop-down style where we get a little tabbed tile there for our slicer instead. Again that sits nicely sometimes at the top of the page.
Let's just I look at a card now, a card visual if I click onto the blank page just going to select my card visual here.
And normally with a card visual we use a numeric field because we've lots of different calculations. So we use the market value USD and automatically it will sum up so it sums up the total market value for all of my rows of data. No, it's very easy to change the calculation that a card does, so what I'll do here is just keep this card and I'll add another one in. I'll just click on my page add a second card visual, bring in market value again, but this time instead of keeping the sum which is default as long as the card is selected, I can go down to the feel section, click on the arrow beside the field name and change it to a different calculation so I can count, find the min, or max or in this case I'm going to look at the average value. Now I have the sum and the average value on my page.
Watch what happens when I use my filter now at the slicer so if I select Euros as my currency, not just my column chart, but both my cards update as well.