3 Replies Latest reply on Oct 11, 2019 2:59 PM by Daniel Donaldson

# How do you add a vertical average line in a histogram?

Hello,

I created a histogram for one measure in my data set. However, the final piece, the vertical average line for that same metric, is missing. I try to add this line but it continues to stick to the y-axis, which is the count (frequency) axis. Any suggestions?

- Daniel

• ###### 1. Re: How do you add a vertical average line in a histogram?

Could you provide a mockup of your data and workbook?

• ###### 2. Re: How do you add a vertical average line in a histogram?

Basically, you can't average bins like that - you need a continuous axis in order to draw that line. It may be easier if you think of another dimension, say Category - what is the average of Furniture and Office Supplies? It's a nonsense question because you need a range of values to average.

With bins it appears you have a measure, but you really don't. You have a bucket of values which have a measure applied to them. So you have 20 items in the 0-50 bucket. What "value" do those items get: 0, 50, 25?

You could create a calculated field: { sum(measure)/count(binned measure) }. The {} would fix the value at the lowest level of the data (so you would get the average value for all your data instead of for each bin). You could then put that in the tool tip. I don't think you could make it a reference line because there isn't a place to put it (you don't have a continuous axis to draw it on).

• ###### 3. Re: How do you add a vertical average line in a histogram?

Christina,

Thank you for your response. I figured that I might have been able to add a reference line labeled with the average of the metric. I see normal distributions where the average line starts at the x-axis, such as those of the IQ bell curve. Anyway, I just decided to insert an annotation.

- Daniel