7 Replies Latest reply on Feb 5, 2017 7:52 PM by Srikar N

# Combination chart with multiple measures with different range of axis

Hello All, I would like to show the combination chart with multiple measures with different range.

Example:

1. First Measure with Bars (Orange colour in the below sample output)

2. Second Measure with lines (Yellow line in the below sample output)

Note: The first and second measure should have the same range on y-axis.

3. Third measure with lines and this measure should have the different range of axis compared to first and second measure.(Yellow line in the below sample output). Third measure shows the range on the dual axis (right side of the chart below)

Please let me know how to achieve this. Thanks in advance

Adding little description to the above chart to ensure I'm clear on what I'm trying to ask for:

• ###### 1. Re: Combination chart with multiple measures with different range of axis

Hi Srikar,

Can you post a sample workbook?

the first measure is a date field.

• ###### 2. Re: Combination chart with multiple measures with different range of axis

Hello Shasank,

Thanks for the reply. PFA the workbook.

• ###### 3. Re: Combination chart with multiple measures with different range of axis

Hi Srikar,

I guess below approach might help you in this. For this we can play with "measure value".

Steps-

1) Drag Measure Values to Rows Shelf.

2) Keep only Measure 1 and Measure 2

3) Then drag Measure 3 to row shelf

4) Make it Dual Axis.

In this way you can have common axis for measure 1 and measure 2. whereas measure 3 is having independent axis.

Now what's next ???

As per your query I have seen that you also wanted to add Bar on this. Let's say we have to show bar for measure 4.

(In sample workbook attached by you, don't have measure 4 . Thus for an instance I will be using measure 2 for the bar purpose as well.) (Well let me tell you that this is the workaround which I used in my projects)

Steps:-

1) Drag measure 2 on details.

2) Then Click on Analytics Section

3) Drag Reference Line.

4) Follow Steps as -

5) Do some formatting to get the look and feel of Bars. (Adding column line etc etc.)

Final Output

I hope this will help you. Please let me know if it works for you.

Limitation :-  Having Ref Line for getting bar is workaround which also limits us to get the Tooltip. For the grey shaded region we can't get Tooltip .

Thanks,

Sumeet

2 of 2 people found this helpful
• ###### 4. Re: Combination chart with multiple measures with different range of axis

Thanks a lot Sumeet. Good solution. I would like to know few more details on your approach.

1.As you shown in your first snapshot: Can we achieve the below:

Measure 1 should be bar

Measure 2 should be line

Above 2 should share the common axis

Measure 3  should be another line with  independent axis .

2. Is there any way that we can show the tooltip in any other way?

Again thanks for your effort behind creating the graph for me

• ###### 5. Re: Combination chart with multiple measures with different range of axis

Hello

Can you please help me on this. Thanks in advance!!!

Measure 1 should be bar

Measure 2 should be line

Above 2 should share the common axis

Measure 3 should be another line with  independent axis .

Here is the sample output. I also attached the sample workbook

Cheers,

Srikar

• ###### 6. Re: Combination chart with multiple measures with different range of axis

hi Srikar,

So with the data as is, I can't improve on Sumeet's method (using reference line/band to create the bars)...when using measure names/measure values we can only use the same set per sheet, and they all have to have the same mark type. In essence here we need 3 Axis...and in Tableau we can only have 2 (although the line and bar are to be plotted on the same Axis-range, we need 2 Axis as they have different mark-types...and then we need a 3rd Axis for the other line as that is a different axis).

I'll keep the gray cells thinking on this one...but pretty sure it's not possible (without getting crazy using polygons to actually "draw" the viz...but would need a lot of pre-processing of the data). If I think of anything I'll post back.

There may well be a good reason (I don't know your final viz and what it's for, and who the audience is)...but generally when you have a dual axis (i.e. 2 different scale axis) you'd expect the same mark-type to refer to the same axis. It wouldn't be "natural" for me to know the Bar and Line 1 are on the left axis and the other line on the right axis (this is probably why Tableau doesn't do this...or why they don't see it as a problem that Tableau doesn't). So I'd consider making the "shared" axis both lines and the other Axis a bar....in which case it's easily solvable.

• ###### 7. Re: Combination chart with multiple measures with different range of axis

Hello Simon,

Thanks for your inputs and detailed explanation as always.

Hello Sumeet,

Many thanks for spending time on providing me the solution.

Cheers,

Srikar