5 Replies Latest reply on Jan 23, 2017 7:44 AM by Nakul Nayyar

# Add Vertical Average Line to Histogram

New to Tableau and found a few threads on this topic but still can't figure out how it's done. Create a calculated field? Is it a reference line, can't seem to put a reference line on X-Axis. Do I calculate it separately and just annotate to the existing histogram manually?

Thanks!

• ###### 1. Re: Add Vertical Average Line to Histogram

Hey Nakul,

Thanks for reaching out and welcome to the Tableau Community! This question was marked as "Assumed Answered" is this correct? If not, let us know and we can try to find a solution.

Thanks,

-Diego

• ###### 2. Re: Add Vertical Average Line to Histogram

Hi Diego,

No it hasn't been answered. Clicked it by accident and no way to change it. Thanks for your assistance!

Nakul

• ###### 3. Re: Add Vertical Average Line to Histogram

Hi Nakul,

Could you please share a workbook

with a sample view (without the Line) --

just to show where you want it to be placed.

Yours,

Yuri

• ###### 4. Re: Add Vertical Average Line to Histogram

Hi Yuriy,

I can't share my data but it applies to any histogram.

Attached is a workbook from another forum post, I just don't understand what steps were taken and/or if I need to annotate instead?

I just want to draw a simple vertical line on the X-Axis wherever the Average of the Values is.

Thanks

1 of 1 people found this helpful
• ###### 5. Re: Add Vertical Average Line to Histogram

Hi Nakul,

The Sheet 1 in the workbook you've shared

contains the two Reference Lines on X Axis,

one of them is the actual Average of [Profit] --

given as the Table Calculation TOTAL(AVG([Profit])).

For drawing Ref Lines there should be

a Continuous (Green) Pill on a view --

it is the [Custom Bin Sizes] in this case.

If one is using automatic (discrete aka Blue Pill) Bins

to make a Histogram, there is no Axis to draw a Ref Line.

You could be using this workbook as a sample. It is self-explaining, imho.

The Tableau Help topics about Ref Lines:

https://onlinehelp.tableau.com/current/pro/desktop/en-us/help.htm#reference_lines.html

Yours,

Yuri