
I am trying to add a trend line to a bar chart. I know this inherently can't be done in Tableau, so am attempting to use the workaround as per the attached Superstore example - i.e. create a line chart on a dual axis, add a trend line to that and then make the actual line non visible.
This is all working fine until I add a breakdown dimension to the colour card (for the bar only rather than the "All" colour mark card, as I want the line chart / trend line to show the grand total). As soon as I do this, my trend line disappears.
I can't work out how this has been achieved on the attached and what I'm doing differently. Unfortunately I'm unable to share my workbook, but might be able to mock something up with dummy data where the issue can be replicated if required.
Thanks in advance!
Hi @Nigel Smith ,
I find that sometimes the order in which you do things matters. I created the two charts first:
Add the trend lines:
Remove it from the bar chart
Set the dual axis
Then add colour to the bar
Thanks,
Mavis