1 2 Previous Next 17 Replies Latest reply on Aug 25, 2016 6:25 AM by Sujith Peta

# How to change the reference line axis? Like a horizontal to vertical?

Hey guys,

I'm trying to make a reference line but by default reference line are getting created horizontal (Parallel to x-axis) but I want the a reference line parallel to y axis.

How can do that?

• ###### 1. Re: How to change the reference line axis? Like a horizontal to vertical?

Add your reference line to the x-axis and it will be parallel to the y-axis.

• ###### 2. Re: How to change the reference line axis? Like a horizontal to vertical?

Hi Joe,

Is there an option to select X or Y axis? I tried to find the option of selecting axis. Could you please tell me how doing that?

Thanks

• ###### 3. Re: How to change the reference line axis? Like a horizontal to vertical?

Can you post a workbook?  Or at least a screen shot?  Depending n what you are doing, you may not have an x-axis.  (And if you don't, then I don't understand what kind of reference line you could have without an actual axis.

• ###### 4. Re: How to change the reference line axis? Like a horizontal to vertical?

My x-axis are bins, I added a sample reference line which is average, by default it's parallel to x-axis but I want parallel to Y-axis

• ###### 5. Re: How to change the reference line axis? Like a horizontal to vertical?

A reference line is on some value that is on the axis in question.  So in your example, your sample reference line is about 1.25%, and that's why it falls where it does on the axis.

You have bins along the x-axis.  Do you want a line to stick up from some [Procedure volume] bin?

As I figured in my previous response, there realty isn't an axis along the x-axis.  It's just dimension values.  (Or bin values.)  But you can create a dual-axis chart where you create a calc that shoves a value for the bin you want the line on, (and null for all the other bins).  You can format that bar to look like a reference line.  But again, I'm just guessing at what you really want to do here.

• ###### 6. Re: How to change the reference line axis? Like a horizontal to vertical?

Yes, I want a line to indicate a specific bin.

I'm a newbie, I appreciate if can you give a little more information on how to create a dual axis chart?

Thank you

• ###### 7. Re: How to change the reference line axis? Like a horizontal to vertical?

Now it's time to post a sample workbook that simulates some of the data you have.  If you are concerned about proprietary data, follow the steps in the video linked here:

It's far easier for me to show you than to try to describe it.

• ###### 8. Re: How to change the reference line axis? Like a horizontal to vertical?

I just started using tableau and using a student version, Can you please tell me how to share the workbook with you? Or is there any other way that I can share the data in this forum?

--Sujith

• ###### 10. Re: How to change the reference line axis? Like a horizontal to vertical?

Hey Joe,

I created a twbx format file, but I don't see option to attach my workbook. Since, it's student verison I don't think I've access to Tableau server.

Can you please tell me how can I upload or send you the workbook? Thank you

--Sujith

• ###### 11. Re: How to change the reference line axis? Like a horizontal to vertical?

When you are adding a reply, in the upper right corner of the edit box it says, "Advanced editor and add an attachment".   Click that.

You get put into the advanced editor.

When you are in the advanced editor, in the lower right corner it says, "Attachment".  Click that.  You'll be able to add your twbX file.  (Let me know what version of Tableau you are using so I can play with your workbook in the same version.)

• ###### 12. Re: How to change the reference line axis? Like a horizontal to vertical?

It's Tableau 9.3 version

--Thank you

• ###### 13. Re: How to change the reference line axis? Like a horizontal to vertical?

What I'm really trying to do is to make Area under the graph with confidence intervals with some specific reference lines.

Since it's converting to bins I'm not able to get what I want from the graph

I'm attaching the raw data, just in case if you need it

Thank you!

• ###### 14. Re: How to change the reference line axis? Like a horizontal to vertical?

What I've done in the attached is this:

I created a calc called [Bars],just to pick a name.  At random I chose COUNT([x]) as the place where I added a line.  You can modify that to use whatever condition you have for determining where the vertical bar will go.  (And you can make as many bars in here as you want.  Just use the OR condition to add in other bars.)

Just to pick a value, I am displaying the max COUNT on the sheet so that the line goes to the top of the chart.  But could have picked the COUNT(X) for that bin instead, and the bar would stop at the graph line instead.

Look at the [Bars] calc.  It sets a value when the condition is met.  For all other conditions the value is null. (Since I didn't specify an ELSE condition, Tableau defaults all other conditions to null.)  Therefore, as it is currently written, this calc just sets a value for only one bin.

So the next thing I did was drag [Bars] to the ROWS shelf.  If you look at Sheet 2, you will see what that looks like before changing the sheet to dual axis.

To make a dual axis, right click on the [Bars] pill on ROWS, and click on "Dual Axis" in the list.  Dual axis essentially lays one viz over another in one place.  Both measures display for each x-axis point.  When you click "Dual Axis", you get a y-axis for each measure -- one on the right side of the sheet, and one on the left.  (Thus, dual axis!)  On Sheet 1, I right-clicked on [Bars] and un-clicked "Show Header" so that we end up only seeing the y-axis for count of X.

2 of 2 people found this helpful
1 2 Previous Next