Customize X-Axis and Y-Axis properties

In this tutorial, you'll learn many different ways to customize the X-Axis and Y-Axis of your visuals. Not all visuals have axes. Pie charts, for example, don't have axes. And customization options vary from visual to visual. There are too many options to cover in a single article, so you'll take a look at some of the most-used axes customizations and get comfortable using the visual Format pane in the Power BI report canvas.

Note

This page applies to both the Power BI service and Power BI Desktop. These customizations, which are available when the Format (the paint roller Screenshot of the paint roller icon.) icon is selected, are also available in Power BI Desktop.

Watch Amanda customize her X- and Y-Axes. She'll demonstrate the different ways to control concatenation when using drill down and drill up.

Prerequisites

  • The Power BI service

  • Retail Analysis Sample report

Customize visualization X- and Y-Axes in reports

To follow along, sign into the Power BI service and open the Retail Analysis Sample report in Edit report view.

Create a stacked column chart visualization

Before you can customize your visualization, you have to build it.

  1. In the Power BI service, expand My Workspace.

  2. Scroll down and select Retail Analysis Sample from the list of Datasets.

  3. From the Visualizations pane, select the stacked column chart icon.

    Screenshot of the Visualizations pane and an empty stacked column chart

  4. To set the X-Axis values, from the Fields pane, select Time > FiscalMonth.

  5. To set the Y-Axis values, from the Fields pane, select Sales > Last Year Sales and Sales > This Year Sales > Value.

    Screenshot of the populated stacked column chart.

Customize the X-Axis

Now you can customize your X-Axis.

  1. In the Visualizations pane, select Format (the paint roller icon Screenshot of the paint roller icon.) to reveal the customization options.

  2. Expand the X-Axis options.

    Screenshot of the X-axis options.

  3. Move the X-Axis slider to On.

    Screenshot ot the On slider.

    One reason you might want to turn off the X-Axis is to save space for more data.

  4. Format the text color, size, and font:

    • Color: Select black

    • Text size: Enter 14

    • Font family: Select Arial Black

  5. Slide the Title option to On to display the name of the X-Axis. In this case, it's FiscalMonth.

  6. Format the title text color, size, and font:

    • Title color: Select orange

    • Axis title: Enter Fiscal Month

    • Title text size: Enter 21

After you finish the customizations, your stacked column chart will look something like this:

Screenshot of the customized stacked column chart.

Save the changes you've made and move to the next section.

If you ever need to revert all of the changes, select Revert to default at the bottom of the X-Axis customization pane.

Customize the Y-Axis

Next, you'll customize your Y-Axis.

  1. Expand the Y-Axis options.

    Screenshot of the Y-axis options.

  2. Move the Y-Axis slider to On.

    Screenshot ot the On slider.

    One reason you might want to turn off the Y-Axis is to save space for more data.

  3. Set the Y-Axis Position to Right.

  4. Format the text color, size, and font:

    • Color: Select black

    • Text size: Enter 14

    • Font family: Select Arial Black

  5. Set Display units to Millions and Value decimal places to 0.

  6. For this visualization, having a Y-Axis title doesn't improve the visual, so leave Title turned Off.

  7. Let's make the gridlines stand out by changing the color and increasing the stroke:

    • Color: Select dark grey

    • Stroke: Enter 2

After all these customizations, your column chart should look something like this:

Screenshot of the chart with the customized Y-Axix.

Customizing visualizations with dual Y-Axes

First you'll create a combo chart that looks at the impact store count has on sales. It's the same chart that is created in the Combo chart tutorial. Then you'll format the dual Y-Axes.

Create a chart with two Y-Axes

  1. Create a new line chart that tracks Sales > Gross Margin last year % by Time > FiscalMonth.

    Screenshot of the new line chart.

    Note

    For help sorting by month, see Sorting using other criteria.

    In January Gross Margin percentage was 35%, peaked in April at 45%, dropped in July, and peaked again in August. Will we see a similar pattern in sales last year and this year?

  2. Add This Year Sales > Value and Last Year Sales to the line chart.

    Screenshot of the line chart with the new data added.

    The scale of Gross Margin Last Year % (the blue line running along the 0M% gridline) is much smaller than the scale of Sales, which makes it difficult to compare. And the Y-Axis label percentages are ridiculous.

  3. To make the visual easier to read and interpret, convert the line chart to a Line and stacked column chart.

    Screenshot of the Visualizations pane with the line and stacked column chart icon called out.

  4. Drag Gross Margin Last Year % from Column Values into Line Values.

    Screenshot of the line and stacked column chart with all three values clearly represented.

    Now you have the stacked column chart you created in the first section with a line chart overlaid on top of it. Optionally, use what you learned above to format the axes font color and size.

    Screenshot of the customized line and stacked column chart.

    Power BI creates two Y-Axes allowing the datasets to be scaled differently. The left axis measures dollars and the right axis measures percentage.

Format the secondary Y-Axis

  1. In the Visualizations pane, select the paint roller icon to display the format options.

  2. Expand the Y-Axis options.

  3. Scroll down until you find the Show secondary option. Verify that it is On.

    Screenshot of the Show secondary option.

  4. (Optional) Customize the two axes. If you switch Position for either the column axis or the line axis, then the two axes switch sides.

Add titles to both axes

With a visualization that's so complicated, it helps to add axes titles. Titles help your colleagues learn the story your visualization is telling.

  1. Toggle Title to On for Y-Axis (Column) and the Y-Axis (Line).

  2. Set Style to Show title only for both.

    Screenshot of the Title and Style options.

  3. Your combo chart now shows dual axes, both with titles.

    Screenshot of the customized dual Y-Axes chart.

For more info, see Tips and tricks for color formatting in Power BI.

Considerations and troubleshooting

If the X-Axis is categorized by the report owner as a date type, the Type option will display and you can select between continuous or categorical.

Next steps

More questions? Try the Power BI Community