Let’s say you work in super hero factory as floor manager. You are looking at the recent time sheet data submitted by your underlings and want to know who works more. So you did what any self respecting floor manager does. You made yourself a large cup of hot chocolate, whipped open Excel and created a column chart.
But now, you want to add a line to it at 6:00 PM (or some other arbitrary point) so you can clearly see which superheros are over working.

So how do you go about it?
Adding a line to column charts – Tutorial
This tutorial assumes you have a column chart. If you have a bar chart, you should use vertical error bars in step 6.

- In a cell, enter the value for your line. Say this is in C15 (and it has 6:00 PM)
- Add this extra point to your chart. At this stage you will get this.

- Take a sip of that scrumpdillycious hot chocolate.
- Convert the new series to as XY chart. Just right click on it and select “Change series chart type”.
- Add error bars to this new dot

- Excel adds both vertical & horizontal bars. We just need horizontal line. So remove vertical (Y) error bars.
Note: if you are adding the line to bar chart, remove X error bars instead. - Set error bar value to 7 (same as number of categories – 1)

- Format the error bar
- Set error bar to plus side only
- Remove cap
- Set the line color and thickness
- Remove marker symbol (set it to no marker) so we have only line
- Chug the rest of your hot chocolate, we are done!
Video tutorial – How to add a line to column chart
Watch this quick video tutorial on how to add a line to column chart to understand this process better.
You can also watch this video on Chandoo.org Youtube channel.
Download Example Workbook – Column chart with a line
Please click here to download example workbook. Play with the input data to see the chart change. Try to recreate the chart from scratch to master this technique.
Become a super hero of Excel charting
Unleash the super hero in you by learning few charting tricks and tips. Start with below, but be warned though. Everyone is going to love your charts.
- Tell all versions of truth in your dashboards
- Color changing line chart…
- Cropped chart – when some values are too big for it
- Use shapes to enhance your charts
- 15 quick & powerful ways to analyze business data
How would you add a line to column charts?
Using error bars to add a horizontal line (or vertical) is just one of the many ways to do this. How would you add a line to column charts? Please share your techniques in the comments section.















8 Responses to “Pivot Tables from large data-sets – 5 examples”
Do you have links to any sites that can provide free, large, test data sets. Both large in diversity and large in total number of rows.
Good question Ron. I suggest checking out kaggle.com, data.world or create your own with randbetween(). You can also get a complex business data-set from Microsoft Power BI website. It is contoso retail data.
Hi Chandoo,
I work with large data sets all the time (80-200MB files with 100Ks of rows and 20-40 columns) and I've taken a few steps to reduce the size (20-60MB) so they can better shared and work more quickly. These steps include: creating custom calculations in the pivot instead of having additional data columns, deleting the data tab and saving as an xlsb. I've even tried indexmatch instead of vlookup--although I'm not sure that saved much. Are there any other tricks to further reduce the file size? thanks, Steve
Hi Steve,
Good tips on how to reduce the file size and / or process time. Another thing I would definitely try is to use Data Model to load the data rather than keep it in the file. You would be,
1. connect to source data file thru Power Query
2. filter away any columns / rows that are not needed
3. load the data to model
4. make pivots from it
This would reduce the file size while providing all the answers you need.
Give it a try. See this video for some help - https://www.youtube.com/watch?v=5u7bpysO3FQ
Normally when Excel processes data it utilizes all four cores on a processor. Is it true that Excel reduces to only using two cores When calculating tables? Same issue if there were two cores present, it would reduce to one in a table?
I ask because, I have personally noticed when i use tables the data is much slower than if I would have filtered it. I like tables for obvious reasons when working with datasets. Is this true.
John:
I don't know if it is true that Excel Table processing only uses 2 threads/cores, but it is entirely possible. The program has to be enabled to handle multiple parallel threads. Excel Lists/Tables were added long ago, at a time when 2 processes was a reasonable upper limit. And, it could be that there simply is no way to program table processing to use more than 2 threads at a time...
When I've got a large data set, I will set my Excel priority to High thru Task Manager to allow it to use more available processing. Never use RealTime priority or you're completely locked up until Excel finishes.
That is a good tip Jen...