Everything looks exactly the way it should, but as you say, it's not working. I went into your workbook and create a bins on ToPad again (ToPad (bin) 2), then used replaced Padded with the new bins and it works fine. I cannot see any difference between yours and mine, but I think it should work if you just recreate your bins. This is a strange one indeed.
sankey chart test _v001.twbx 82.7 KB
Ken Flerlage, thank you very much.
Yes, this is very strange that, as you pointed out, the 2nd bin created in exactly the same way works, whereas the 1st one doesn't... (see image below)
I wonder if there is a bug in Tableau in this case... Hope Ian Baldwin and others familiar with this approach can kindly advise.
1 of 1 people found this helpful
Ken Flerlage, it seems the "show missing value" option has to be selected when the bin is put in Rows before it is dropped to Detail, otherwise it will not work:
Ian Baldwin did mention this step in his latest tutorial:
The thing is that now I can produce the sankey chart following the SuperDataScience tutorial, but I'm unable to produce it following Ian's method which seems to be the most efficient way to do it... Quite frustrated.
Anyway, the following is all the tutorials I found on how to create Sankey chart in Tableau so far. Hope it is helpful for others learning this technique:
date author title link 3/25/2014 Jeffrey A. Shaffer A Graph Recreation in Tableau - Part 2: How To Build https://www.dataplusscience.com/RecreationinTableau2.html 7/9/2014 Jeffrey A. Shaffer Using Improved Data Connectivity in Tableau 8.2 to Build Sankey Diagrams https://www.dataplusscience.com/SankeyinTableau82.html 11/22/2014 Olivier Catherin Sankey diagram made of dynamically generated polygons https://community.tableau.com/thread/152115 12/16/2014 Olivier Catherin Building a decision tree https://community.tableau.com/thread/153509 3/4/2015 Chris Love Sankey Charts in Tableau https://www.theinformationlab.co.uk/2015/03/04/sankey-charts-in-tableau/ 5/19/2015 Olivier Catherin Decision trees, flow diagrams, sankeys in Tableau... here is a solution !!! https://community.tableau.com/thread/154623 1/17/2017 John Heisler Sankey with Tableau: A Lesson in Discretion https://www.youtube.com/watch?v=7G0yBfrPZfM 5/13/2017 SuperDataScience SANKEY DIAGRAM TABLEAU https://www.youtube.com/watch?v=1HwCzlA9hI4 8/3/2017 Vytautas Bielinskas Sankey Chart for Web Data Analytics and Visualization. Tableau (My first Sankey diagram!) https://www.youtube.com/watch?v=nITgj-EepjM 12/30/2017 Morgan Jason Tableau Expert: Top Visualization Techniques in Tableau 10 : Homework: Double Sankey https://www.youtube.com/watch?v=CTAx-n8TuvM 3/9/2018 Ian Baldwin How to build a Sankey diagram in Tableau without any data prep beforehand
Next week, I'll be publishing one more Essentially I'll be sharing my simple template for creating a sankey.
Hi Ken Flerlage,
I replicated most of your calculated fields to reproduce the Sankey template you created.
However, I'm unable to group the curves by the categories in both bar 1 and bar 2:
1. Appreciate if you can kindly point out which step is wrong over here.
2. I haven't figured out how the combined sets are created as shown in your template. Hope you can kindly advise.
3. Also, may I ask how to remove the gaps between the components in both Bar1 and Bar2 to make them like stacked bar chart?
The purpose of my template was to be plug-and-play--you fill in the data, then plug it into my Tableau template. So, you shouldn't need to create the calculations from scratch. Is that what you've done here or something else?
Hi Ken Flerlage, the plug-and-play of your template works.
I'm just trying to understand how the chart is created. Obviously, I may have missed important components or steps to replicate your template.
Hope you can kindly advise.
Ken Flerlage Here is my implementation of your Sankey Chart template in building energy balance analysis.
Usually, building energy balance chart is plotted as a stacked bar chart, in which
- Items with positive values indicate sources of heat energy added to building
- Items with negative values indicate sources of heat energy removed from building
- total heat gains and total heat losses must be the same for each zone
For example, the graph below shows the different types of heat gains or heat losses through different manners for two zones within a building based on the building energy simulation results produced by EnergyPlus.
Since there are negative values, I revised the two calculated fields in your template by calculating the absolute value of [Size]:
Applying your sankey chart template to the data I extracted from the example above, we have the following:
... and a bit tweak on the tooltip to show the energy balance item value related to each thermal zone and the relative ratio:
If you'd like a more in-depth discussion of the chart, I'd recommend the following: Data + Science This is the original how-to for polygon sankeys.
That being said, I'd be happy to take a look if you can post a packaged workbook.