Home and Learn: Power BI 2023
In the previous lesson, we created a line chart in Power BI. But it looks a bit of a mess. We have this, so far
In this lesson, we're going to spruce the chart up. It will look like this, when we're done:
Let's get started.
By default, Power BI has used a light blue for the Red Widget, dark blue for the Blue Widget, and orange for the Green Widget. Let's change these default colors. We need to bring up the Format panel to do so.
Click the paintbrush icon in top right of the chart to see a new flyout:
Power BI has checked the boxes for Title, X-axis, Y-axis, Secondary y-axis, and Legend. To see what these are, uncheck them. They will disappear from the chart. Check them again to bring them back. Also, check the ones that are unchecked, in the image above, just to see what they do. The Markers one is helpful.
But click the More options button to bring up the Format panel
on the right of Power BI. There are quite a lot of options to explore:
The option we want first is Lines. Expand the Lines > Colors item to see the following:
Now select the correct colors from the dropdown Colors:
Your chart will look like this: (We added the markers, as explained above.)
The Title at the top needs changing as it's far too long.
Expand the Title section of the Format panel to see the following:
If you don't want a title at the top, simply toggle the On/Off button.
Type some new Text for your Title. You can change the Font, Text color, Background color, and alignment:
We've went for the Text Widget Sales in 17 point font. We've made it bold, changed the color to blue, and have the Horizontal alignment as centered. The result is this on the chart:
Now let's format the Legend (you do remember which one the legend is, right?).
Rather annoyingly, you can't change the Legend text from the Format panel. Even though there is a section called Legend, with Title and Text items under it. The text we're trying to change is this:
We want to change the text to the right of the colored circles. How do you change the Legend text, then, if you can't do so from the Format panel? From the Build a visual flyout, of course! How did you not guess that?
With your chart selected, click the icon to toggle the Build a visual flyout. Right-click the Sum of Red Widgets under the Y-axis heading:
From the menu that appears, select Rename for this visual (second item from the top, in the image below):
Type some new text for the legend:
Rename the other two in the same way:
Your chart will then look like this:
You can center your Legends. Go back to the Format panel and the Legend section. Expand the Options item and notice that there is a Position dropdown:
The default is Top Left. Change this to Top Center.
If you want, you can change the marker style, as well. In the image below, we've gone for a Line instead of Mark (circle default):
The vertical text for the Y-axis is far too long. To change it, expand the Y-axis item in the Format panel. Under Y-axis, there is a section for the Title. It currently says Auto:
Type some new text here:
The Y-axis title should change on your chart:
Our vertical Y-axis title on the left now says Sales.
If you want to change the background color of a Power BI chart from the default white, expand the Size and Style section at the top, then the Background item: (If you want to use a picture as the background, expand the Plot area background section at the bottom of the Format panel.)
Select any color you like for the background, and play around with the Transparency slider.
Notice that there is a Visual Border section and a Shadow section. Play around with these to see what you can come up with.
If you want to change the liner markers from the default round ones, expand the Markers > Shape section:
You can change the size of the markers and the shape of them via the Type dropdown. In the chart below, we've changed the markers to a larger diamond. We've also added a chart background color with rounded corners:
A good chart conveys its information quickly and easily. And the best charts aren't cluttered with unnecessary details.
OK, we'll move on and look at the other chart types you can have in Power BI.
<--Back to the Power BI Contents Page
Email us: enquiry at homeandlearn.co.uk