12 Replies Latest reply on Oct 6, 2016 10:59 AM by Mike Heenan

# Combining box plot and line graph

Hi there,

I currently have two separate charts: a boxplot that summarizes sales over time (years). I also have a line graph where you can pick a particular product and it will provide the average line of sales for this product over time. I would like for these two charts to be overlayed, such that the boxplot stays the same (only affected by certain filters, not product) and an average line over top that can be changed by a filter.

I can't figure out how to get two different plot types to work, I can them both on the same worksheet but it makes both charts into box plots.

Any help is appreciated.

Thanks!

• ###### 2. Re: Combining box plot and line graph

Hi Luciano,

I've attached a file with some made-up data that has the two components that I want to combine: a boxplot of all data and a line graph of average filtered by product. Is it possible to get the line graph to overlay the box plot and be filtered separately from the box plot?

Thanks.

• ###### 3. Re: Combining box plot and line graph

Mike, you could have this view if your two graph had as columns discrete dates or continuous dates without mixing types.

You'll be able to see on attach.

• ###### 4. Re: Combining box plot and line graph

Hi Luciano,

This is close to what I want but: I want to be able to choose a product and have the average line show on top of the boxplot (for ALL products).

Essentially, I want to choose product B, for example, and see the average line while the boxplot remains unchanged. The boxplot is meant to represent all data while the average line provides an understanding of where that particular product's average sales are related to the full group.

And ideally (if possible), the average would be a connected line.

• ###### 5. Re: Combining box plot and line graph

This is what i was trying to explain for you.

You x axis doesn't allow that because you mix discrete and continuou data.

Continuous:

Discrete:

You only could have a line if both were continuous but continuous date doesn't work for boxplot:

• ###### 6. Re: Combining box plot and line graph

What you can do is work with both discrete.

wrong attach

• ###### 7. Re: Combining box plot and line graph

Understood, makes sense. I can make due with the average showing up how you had it, but do you have any ideas re: the filtering?

Essentially, I want to choose product B, for example, and see the average line while the boxplot remains unchanged. The boxplot is meant to represent all data while the average line provides an understanding of where that particular product's average sales are related to the full group.

• ###### 8. Re: Combining box plot and line graph

I think you might have attached the wrong workbook there (unless I'm confused).

• ###### 9. Re: Combining box plot and line graph

Did you see with both discrete?

• ###### 10. Re: Combining box plot and line graph

Yes, I have the line working, thank you. Now I just need to set up a "product" filter that affects the average line but not the boxplot so I can compare specific product averages to the full group's boxplot. Ideas for this? I can't manage to find a way to add the filter without affecting the boxplot as well.

• ###### 11. Re: Combining box plot and line graph

I made with parameters in order to affect only average.

See attach.

• ###### 12. Re: Combining box plot and line graph

Amazing, thank you!