9 Replies Latest reply on Oct 25, 2016 6:06 AM by ra.sae.0

# Categorical Y-axis with continuous lines

Hi all,

I'm trying to create a categorical Y-axis based on values in a line graph. The lines in the graph need te be continuous so only the labels in the axis need to be converted to categorical values. In my example there are numbers from 1 to 10 (float) for the past ten years. Based on some formula, the numbers represent categories a, b, c, d, etc. I've tried and searched but cannot find a solution.

Does anybody know if this is possible in Tableau?

Kind regards,

Simon Heerings

• ###### 1. Re: Categorical Y-axis with continuous lines

Hi Simon,

I am not sure of your requirement.

Can you share the sample data in a Table or excel and how you want the output to be?

Also if you can share the TWBX packaged Workbook which you were working, it will be helpful for us.

Please share with sample data and no need of real data.

Thanks.

• ###### 2. Re: Categorical Y-axis with continuous lines

Rasza,

In Excel I have managed to achieve what I want with a little trickery. I have no idea how to do this in Tableau or if it is even possible. Since I cannot find how to upload an Excel file. Below is a screenshot. Column A and B are the actual values. Next I have deleted the Y-axis then I added three datapoints (9,8,7) and for these datapoints I added labels named A,B and C. The labels are shown in the graph actually representing the Y-axis. Hopefully it is clear now what I want.

Regards,

Simon

• ###### 3. Re: Categorical Y-axis with continuous lines

Hi Simon,

PFA workbook.

Yes, Its possible in Tableau, multiple ways.

You have three ways(could be even more).

Option1: Using Category as a Measure i.e making a min(Category ) and Line Chart, path by Date

Option 2: Using the similar way you did for Excel, Giving it a value and then just changing the label.

Option 3: Using Calculated field to categorize the value for each date.

I prefer the first one. But you pls choose the one you need.

Hope this helps.

• ###### 4. Re: Categorical Y-axis with continuous lines

Rasa Raza,

Thanks, this defenitely helps. I ended up using option three. I only need to  figure a way out to sort them correctly. It now chooses alphabatically but this is unfortunately not correct.

Kind regards,

Simon

• ###### 5. Re: Categorical Y-axis with continuous lines

Hi Simon,

Can you let me know how you want it to be sorted. Any screenshot or expected Output?

Can you share your updated workbook in TWBX file?

• ###### 6. Re: Categorical Y-axis with continuous lines

Hello Rasa,

So attached is workbook with a sample of our data. It needs to be sorted like in sheet 3 but prefereably without the (1), (2), etc. in front. If I do it without the 1,2,... in front it ends up like in sheet 4.

Kind regards,

Simon Heerings

• ###### 7. Re: Categorical Y-axis with continuous lines

Hi SImon,

I used a workaround. I hide the Labels and used another worksheet on Dashboard to make it look single table.

But I have issues : Australia shows NULL Calc, couldn't exclude it. PFA workbook.

1 of 1 people found this helpful
• ###### 8. Re: Categorical Y-axis with continuous lines

Rasa,

I noticed Australia had no Data for 31-12-2004, sorry for that. So it works! thanks for all your help.

Kind regards,

Simon

1 of 1 people found this helpful
• ###### 9. Re: Categorical Y-axis with continuous lines

Thats Great