MIP Logo

Bar in Bar Chart and Reference Line (Part 2)

This post was originally published on The Data School blog between 2018 and July 2025, before our program was renamed to MIP’s Analytics Career Accelerator. References throughout this article to “The Data School” or “DS” all refer to what is now MIP’s Analytics Career Accelerator. The program, its people, and its commitment to launching outstanding analytics careers remain the same – just under a new name.

If you are having trouble viewing this article, please report it here

We’ve finished building the bar in the chart in Part1 Blog. Now we’re going to add two reference lines to the chart. One shows the average sales in 2018 and another one shows average sales in 2019.

Step 1: Click Analysis on the left and Drag Reference Line to Table.

Then the right window shown below will pop up and in the drop-down list of Value, we cannot see “2018 sales” or “2019 sales”. In this way, we can’t create separate reference lines for each year. Thus, we need to drag “2018 sales” and “2019 sales” into Detail.

      dataschool blog by prerana amatya

Step 2: Drag “2018 sales” and “2019 sales” into Detail. 

Now we can add two reference lines, one for sales in 2018 and one for sales in 2019.

Step 3: Right-click the reference line to edit or format it.

All done! Now you can apply bar in bar chart and reference line in your cases!

Share this post