3 Replies Latest reply on Apr 1, 2016 8:58 AM by Olivier CATHERIN

# Best approach to create a Sankey where items enter and exit the flow at each node?

Hello!

I'm working on a sankey diagram where the dataset has items that enter and exit at every node. I've already learned how to build the basic polygonic sankeys from great post of Olivier CATHERINE's on Sankey diagram made of dynamically generated polygons. I've built a multi-step sankey where every item that starts at Node 0 finishes in Node 3 - so each node (bar chart between curves) equals 100% of the total number of rows. I'm fairly confident I can do this, I'm having trouble figuring out the best way to structure the data and build the node calculations so that so that each node has some items that start and end. To put it another way - items across this flow will enter and exit at different points and I need to show this.

Here is basic hand drawing of what I am trying to accomplish:

Here is a sample of what my data looks like (I've done significant transformations in Alteryx to get here - so I can tweak this more):

I'm working on a workbook, but it is taking a while to reverse engineer all of the equations so I'd love some hints to get me going on the right path. I'll post my final product when I get it working.

Thanks!

• ###### 1. Re: Best approach to create a Sankey where items enter and exit the flow at each node?

Hi again,

I've created the workbook that is the beginning of this approach and attached it here.

As you can see in this screenshot of the sankey - I need to remove all of the areas that I colored in light gray. I've been playing with the calculations to see what I can make happen, but so far this is about as good as I can make it.

Any thoughts on how to modify these calculations where I can have items that start and end at each node without having to have them move through the entire flow?

Thanks for your time!

• ###### 2. Re: Best approach to create a Sankey where items enter and exit the flow at each node?

Hi again,

I figured it out. I basically just had to hide the data using the techniques described in this post: Tinkering with Filtering vs. Hiding « Tableau Tinkering.

Worked like a charm:

Attached is the final workbook.

1 of 1 people found this helpful
• ###### 3. Re: Best approach to create a Sankey where items enter and exit the flow at each node?

Nicely done Will  !

OC