2 Replies Latest reply on Sep 16, 2013 1:29 AM by bart.groots

# 3 Axis

Hello,

See my workbook. I like to have a dual axis graph with:

1 axis for measures:  - Aandeel. ketels warmte [Gj]              &        -Totaal gel. door WP [Gj]

&

1 axis for my measure Procentage%

So 3 Measures with two Axis.

Is this possible?

greets

• ###### 1. Re: 3 Axis

Hi Bart,

You don't need to use dual-axis for a stacked bar chart. Just add measure values (the field, not the individual values) to the rows shelf and select the measures that you want in the view--each bar will be colored if measure names is on the color shelf. This will give you a free second axis for your line graph.

Also, you may want to look at your percentage calculation. Your current formula is

[Totaal gel. door WP [Gj]]] / [Total] * 100

This will perform the calculation on every row and then, when added to the view, aggregate those values with SUM, AVG or whatever you choose.

But what I think you want is

SUM([Totaal gel. door WP [Gj]]]) / SUM([Total])

This will first sum the values and then divide. When you add this measure to the view it will be an AGG() type, which means it's already aggregated and you can't further SUM(), AVG() or MIN() / MAX() it.

For example, in your table view you have two rows for SUM(Totaal gel. door...) and SUM(Total). If you want to divide these, then you want the second formula. You may be getting the same answer now, if your data only has one value per dimension (date in your case).

Note also that I dropped the *100 in the second calc. You can use Tableau's formatting to make this a %---just right click on the measure in the left pane > Default properties > Number format.

Jim

• ###### 2. Re: 3 Axis

Jim,

THANKS

You really helped me out & my chart looks a lot better.

Thanks for the good explanation! This makes it really clear to me.

Thanks again,

Greets Bart