Combo charts in Power BI: line and column, two axes

What a line and column (combo) chart in Power BI is for, how to put two measures with different scales on two Y-axes, when to sync the axes, the DAX for a target line, and the traps of dual axes.

Short answer: a combo chart puts a column chart and a line chart in one visual with the same X-axis. Power BI has two: Line and stacked column and Line and clustered column. Measures in Column y-axis become columns, measures in Line y-axis become lines, and when their ranges differ the line gets its own secondary y-axis on the right. Use it for an amount and a rate (revenue and margin %), or an actual and its target.

The chart, part by part: What is a combo chart? draws its parts and shows how to read one, its kinds and the mistakes to avoid.

Revenue in thousands and margin in percent cannot share an axis: the margin line would lie flat at the bottom. Two charts next to each other work, but the reader has to line up the months by eye. A combo chart does it for them.

When is a combo chart the right choice?

Microsoft names five cases: a line and a column chart with the same X-axis, several measures with different value ranges, the correlation between two measures, checking a measure against a target held by another measure, and saving space. In practice the two common ones are:

  • Revenue
  • Margin %
050100150200010203040JanFebMarAprMayJun
Revenue as columns (left axis), margin % as a line (right axis)

April and May sold the most and earned the lowest margin: the discounts that bought the volume show up in the same picture.

  • Actual
  • Target
02004006000100200300400500Q1Q2Q3Q4
Actual sales as columns, target as a line, one shared scale

How do you build one with two axes?

  1. In Visualizations pick Line and clustered column chart (or Line and stacked column chart when the columns have a Legend that should stack).
  2. Drag the time field to X-axis, the amount to Column y-axis and the rate to Line y-axis.
  3. In Format visual, turn on Secondary y-axis and give both axes a Title, so nobody reads 30 as 30 thousand.
  4. For an actual against a target in the same unit, put both on one scale: under Secondary y-axis, Range, turn Values off. The line then uses the columns' scale.

Power BI shows or hides the secondary axis by itself, depending on how much the two ranges overlap; the top switch of Secondary y-axis forces it on or off.

What DAX does a combo chart need?

The amount and the rate as measures:

Revenue = SUM ( Sales[Amount] )

Margin % =
DIVIDE ( [Revenue] - SUM ( Sales[Cost] ), [Revenue] )

A target line from a monthly target table related to the date table:

Target = SUM ( Targets[Target Amount] )

Target Hit =
IF ( [Revenue] >= [Target], "On target", "Below target" )

Margin % is a ratio of sums, so its total is right at every level; an average of row-level margins would not be. Use Target Hit in a tooltip, or as a colour rule on the columns: Columns, Color, fx, Rules on a measure that returns 1 or 0.

Line and stacked or line and clustered?

VariantColumnsUse for
Line and stacked columnone column per period, split by a Legendrevenue by channel stacked, total margin % as the line
Line and clustered columnseries side by sidethis year and last year as columns, growth % as the line

What goes wrong?

  • Two unlabelled axes. Without titles, readers compare the line's height with the columns' as if one scale held both. Title both axes, or colour each axis like its series.
  • Two axes for the same unit. An actual and a target in euros on two independent axes can make a miss look like a hit. Sync them (one scale) whenever the units match.
  • A rate as columns. Percentages stacked as columns add up to nonsense; rates go on the line.
  • Too many lines. One or two lines read well; four lines over stacked columns do not.
  • Correlation read as cause. Margin falling while revenue rises shows they moved together, not why.

Where can you check this?

Where do you start?

Use a combo chart for one amount and one rate on the same timeline, title both axes, and sync them whenever the units match. Actual, target and variance in DAX builds the target measures, and the KPI visual shows the same comparison as one number.

Keep reading

More from the blog.

Every post

Next

Building this? Say hello.

A question about this post, a pattern you would build differently, or the next thing you want written out: Behnia reads every message.