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.
Sample_jimw.twbx.zip 32.3 KB
You really helped me out & my chart looks a lot better.
Thanks for the good explanation! This makes it really clear to me.