10 Replies Latest reply on Jan 15, 2014 1:59 PM by Jonathan Drummey

# Combined stacked bar and slope graph with custom sort.

Hi folks, I am trying to replicate this style graph from the Economist.

I'm far enough along with the stacked bars that I'm happy. The custom sort on a combined field I used to accomplish this appears to be my major impediment to adding the slope graph lines as well. I've attached the workbook to this message. Thank you in advance for any help.

• ###### 1. Re: Combined stacked bar and slope graph with custom sort.

There's obviously formatting stuff that needs to be done.  This is just an example of how the logic could be approached.

• ###### 2. Re: Combined stacked bar and slope graph with custom sort.

That's awesome.  Can you explain the process you used to create this?

• ###### 3. Re: Combined stacked bar and slope graph with custom sort.

Thanks Matt :-)

Disregard the Cat position calc.  It's not necessary.

I dual axis-ed with the existing value calc  on the left and I did a running sum of that value for the right axis as a line chart.  I multiplied that value by .9 to shift the values down.  The "sort order" and "compute using" are the important parts but there's a lot to account for.

• ###### 4. Re: Combined stacked bar and slope graph with custom sort.

Very nice, I see how it works now.  Very cool solution, thanks for posting!

• ###### 5. Re: Combined stacked bar and slope graph with custom sort.

Brilliant! And thanks mucho. Looking back at my original issue, what was the larger impedement appears to be that I used "percentage of column" instead of creating the calculated fields. Great job.

• ###### 6. Re: Combined stacked bar and slope graph with custom sort.

Thanks guys, glad you like it and always happy to help.

• ###### 7. Re: Combined stacked bar and slope graph with custom sort.

Nice, Aaron!

Here's another copy of an Economist graph built in Tableau via a lot of data reshaping in order to get the polygons right:

It was done for this Idea: http://community.tableau.com/ideas/1819

1 of 1 people found this helpful
• ###### 8. Re: Combined stacked bar and slope graph with custom sort.

very nice.  I want to create something like that without reshaping the data but not sure if it would be a good road to go down in regards to retaining my sanity.

• ###### 9. Re: Combined stacked bar and slope graph with custom sort.

Minor disclaimer: The data in the workbook I originally included was the original dataset from the Economist but I reshaped it from wide to long using OpenRefine -- formerly Google Refine.

• ###### 10. Re: Combined stacked bar and slope graph with custom sort.

I've thought at times about writing up how to do this but I thought it was too complicated and needs to be simpler. Some reshaping is necessary because we have to use continuous X & Y axes to draw the polygons, so that means needing 4 data points per polygon & color and the raw data only has 2 per color. Theoretically we could do that reshaping inside Tableau using domain padding, but the table calcs would then get even more complicated.

I'm just starting to use Alteryx, something I'm curious about is whether it would be suitable for doing the kind of reshaping necessary to generate views like this.