Matt Snively
In this video, you’ll learn how to create and use effective bar charts in Power BI Desktop. Matt will teach you how to format visually striking bar charts to quickly display useful insights to your viewers.
Hi, this is Matt with Playfair+. In today’s video, we’re going to create and format a clustered bar chart. Bar charts are foundational in data viz. It’s one of the most used chart types. And to get the most out of those bar charts, we’re going to want to know how to format them, how to add some additional pieces of information that’s going to make the insights that you get from your bar chart clean and quick.
Let’s dive in. We’re going to go ahead and do a clustered bar chart. And I’m going to make it a little bigger for us to see. And then it looks like we’ve put Category from the Product table on the y-Axis. And we’ve put Sum of Sales Amount on the x-Axis. So let’s go back and we’ll do Sales Amount on the x-Axis.
You just drag it over, and you can see. Drops it in the aggregation by default is sum. If you want to change that, you can just click on the little down arrow, change it to average, minimum, maximum. You know, any of these are available. And you can also rename for this visual. So let’s say, I want it to say Sum of Sales Amount, but I really just want it to say Sales Amount.
It’s easy to make that change. Without doing too much other things. So I went and clicked the back arrow just because our example does have Sum of Sales Amount available in it. So this is kind of our first view. We’ve created it. It’s a clustered bar chart. Very simple, right? Okay. It’s a little different than Tableau.
But how do we go from this view, this clustered bar chart to, having a better version of this? So, if you look at our slide, you kind of see the next thing that we’ve done, we’ve worked into the Format pane. So under visualizations, we’re looking at formatting this visual. How do we change this?
Well, we’ve certainly changed the title, so we want to go and make sure we’re, we’re looking at title and right now it says Sum of Sales Amount by Category. No, that’s fine. We’ll change it to AdventureWorks Sales Breakdown. And let’s go ahead and bump up the size of this. Make it 18 and we’re going to align it in the center of our chart.
And then I don’t think I did this in the example. We can make it bold. Let’s make it bigger. So, or make it strong so that we can really see what’s going on. So this is our AdventureWorks Sales Breakdown. Alright, what else have we done? Well, we’ve got grid lines on this initial view and our final version in our slide doesn’t have any.
So let’s just turn the grid lines off. We’re going to keep that data-to-ink ratio as large as we possibly can. So we want to make sure we’re showing the most amount of information with the least amount of ink. So, let’s remove those grid lines. They’re not really providing a ton of information, but now we’re thinking, okay, let’s make sure we get our data labels in here so data labels are added.
So that way we can see what the actual value of these bars are, and if we’re looking at our example slide, you’ll see that the data labels have the dollar sign in front of the value. They don’t have them in our freshly built download of the AdventureWorks Sales Breakdown. So let’s see if we can fix that.
We’re looking at. The Sum of the Sales Amount and let’s go to table. So we’re on the Table view in our Sales table, and we’re going to scroll over to Sales Amount. And you can see we are a fixed decimal number because we did change that in Power Query Editor. Our format is General. We need to make sure our format is Currency.
And we’re going to make sure we have two decimal places because it’s currency. We use two decimal places with our currency. And then I want to make sure we have our dollar sign active. It is. Hold on. Looks like that clicking that has changed. Okay. And now when I go back to my Report view. Our dollar signs are there.
So it’s a really handy way of making sure that we’re visualizing what we expect to see. It’s not 95 million units, it’s $95 million. And so if we’re trying to make our information as clear as possible, it’s a great way to make sure we’re doing it. So, now we’ve also colored by Category on our slide example.
So let’s go in and take a look at that in the Format pane. So we’re going to go look at our bars and right now we have all categories selected. But I want to make sure that these are individual changes. So let’s go ahead and make our changes. And you know what, I haven’t done the JSON color change yet, so these will be slightly different.
I try to match them as best I can. And then at the break I’m going to go ahead and do that. So, Bikes are going to be a red, our Components are going to be, let’s find a Navy color. Our Clothing is currently set to a blue. Let’s make this like a teal. Can we do that? Let’s do a teal. So, yep. Perfect. And then Accessories is going to be a yellow.
So we’ve got our color changes here. The Playfair Data colors on our slides are a little nicer than what I’ve just created, so, that’s my personal opinion. Alright, so now we’ve got our custom colors splitting this out, and you think, Matt, this is one category we’re splitting. Why are we double encoding here?
Why are we splitting these out by both category and color? Well. In the future, if we wanted to have more than one visual on screen, we probably want to make sure that the user is visually connected to seeing Bikes in one color, Components in another color. We might have it in a line chart. We might have it in a scatter plot where we have multiple values for each of these categories.
And by using the color here in our really simple bar chart, we’re able to set the user expectation that when I see blue, I’m thinking of Components. So when I see a scatter plot that has several blue dots on it, I’m going to make the connection. I’m looking at Components and we’ll go on from there. So, yeah, that’s really, it’s, it’s one of the reasons you would double encode.
Otherwise, I would say, let’s just make sure we keep all these red, let’s keep all these blue, single color. But if we’re going to do what we’re going to do in this example today in our exercises, I want to make sure that we have multiple colors to connect visually. So, alright. And we’re, this is looking pretty good.
I do want to add, let’s see here. I want to make sure that our, I don’t think we need to have Category and Sales Amount. We know what we’re looking at here. So what we’re going to do is we’re going to go in and we’re going to look at the Axis, the Values, yes. Title, No. So we’ll remove that from y-Axis. We’ll remove that from the x-Axis.
And we’ll move on from there. And the last thing we want to do is go from formatting to the Analytics pane. And I want to add one bit of information that’s going to ground this image a little bit. We’re going to add a constant line, so I want to add a constant line. And I want to put it at zero so it defaults to zero.
I’m going to make it black and it’s currently 50% transparent. I don’t want this to be transparent at all. I just want it to be a 0% transparent, solid line. And I want it to be one pixel because it doesn’t have to be too big. And then I’m going to move it to behind. So now this creates kind of the grounding floor for our bars that lets the user know really quickly, yes.
This is where everything starts. This is our axis. It’s a really clean way of creating our AdventureWorks Sales Breakdown. This has been Matt with Playfair+. Thanks so much for watching.