Tableau Sankey Chart – Build Sankey Diagram in Tableau

FREE Online Courses: Your Passport to Excellence - Start Now

1. Objective

In this Tableau tutorial, we are going to study what is Tableau Sankey Chart, how to build a Sankey chart in tableau diagram and a stepwise description with Sankey chart example.
So, let us start with Sankey Chart in Tableau.

Tableau Sankey Chart

Tableau Sankey Chart

2. Tableau Sankey Chart

Tableau Sankey chart diagram is a visualization used to depict a flow from one set of values to another. The things being connected are called nodes and the connections are called links. Sankeys is best used when you want to show a many-to-many mapping between two categorical dimensions. Sankey chart in tableau is a good alternative to bar charts or pie charts if you wish to show flow quantities. In Sankey diagrams, the width of the arrows is proportional to the flow quantity it represents. So, attention is drawn immediately to the most important flows in the processing system.
Let’s see Tableau Design Flow in Detail

3. Create Sankey Chart in Tableau

These are the following steps to build a Sankey Diagram in Tableau.
Step 1:
Create a Calculated Field T
(INDEX ()-25)/4
So, once your Index is one it’ll provide you with – half-dozen, after you index is going to be a pair of it’ll provide you with -5.75 soon.
Step 2:
As per Zen Master Jeffrey Shaffer, if we tend to take forty-nine points for every dimension, we are able to simply plot the form of swish curve line.T ought to be in between -6 and half-dozen and if we tend to take .25 increments we’ll get forty-nine values.
So, produce a Calculated Field “To pad”
IF [Order Date] = THEN one else forty-nine finish
So once your Order Date matched with Min (Order date) it’ll assign worth|a worth|a price} one and for all alternative dates value are going to be forty-nine.
Read about How to Create Pareto Chart in Tableau
Step 3:
Now we’d like a “S” formed curve (sigmoid curve). thus produce another calculated field referred to as sigmoid perform
1/ (1+EXP (1) ^-[T])
Step 4:
Create a replacement Bin of Size one referred to as cushioned.

Sankey Chart in Tableau

Step.4 Creating Sankey Chart in Tableau

Step 5:
Build our Ranking Calculation. We square measure making a running total of a variety of records and dividing by the general Total which is able to offer the United States of America an additive proportion.
Let’s Learn How to Make Sparklines Chart
[Rank 1] = RUNNING_SUM (sum ([Number of Records]))/ TOTAL (sum ([Number of Records]))
[Rank 2] = RUNNING_SUM (sum ([Number of Records]))/TOTAL (sum ([Number of Records]))
For Example-
Region            Running_Sum(sum ([Number of Records]))                   TOTAL (sum ([Number of Records]))
Central                            2,323                                                              2,323
East                                2,848                                                              2,848
South                              1,620                                                              1,620
West                               3,203                                                               3,203
Region RUNNING_SUM (sum ([Number of Records])) TOTAL (sum ([Number of Records]))
Central a pair of,323 a pair of,323
East a pair of,848 a pair of,848
South one,620 one,620
West three,203 three,203
Step 6:
Create a Curve Function:
[Curve] = [Rank 1] + (([Rank 2] – [Rank 1])*[Sigmoid Functions])
[Rank 1] + (([Rank 2] – [Rank 1])* [Sigmoid Function])
Read How to Make a Population Pyramid in Tableau
Step 7:
Drag cushioned Bin on row shelf. Right, Click and choose “Show missing Values”. modification the Marks Card choice from “Automatic” to “Line”. choose the cushioned field that is on the market on Row shelf and place it into path marks card

Sankey Chart in Tableau

Step.7 Creating Sankey Chart in Tableau

Step 8:
Drag T calculated Field on Row Shelf and “Compute using” cushioned (which is on the market on Path Marks card)
Step 9:
Drag Region and class at the same time and place it into the color marks card.
Let’s explore Types of Filters in Tableau
Step 10:
Drag the Curve calculated field on Column shelf. Our [Curve] calculation has 3 components thereto, [Rank 1], [Rank 2] and [T].We need every of those to handle over completely different dimensions.

Sankey Chart in Tableau

Step.10 Creating Sankey Chart in Tableau

Step 11:
We currently have to be compelled to vary the lines by size, supported the number of records. Adding add ([Number of Records]) to Size won’t look smart because the cushioned marks haven’t any records related to it. thus produce a calculated field referred to as Size that should be computed victimization cushioned bins. this could solely be potential if we tend to use some Table calculation.
RUNNING_AVG ( MIN (fastened [Region], [Category] : SUM([Number of Records]) }) )
Now drag that calculated Field on size marks card and cypher victimization [Padded]
Step 12:
The final result can appear as if the below image.

Sankey Chart in Tableau

Step.12 Creating Sankey Chart in Tableau

Step 13:
As per the definition of Tableau Sankey chart, it depicts a be due to one set of values to a different. It’s forever smart if you show the flow in your chart. So, we’ll produce 2 single bar stacked chart sheets showing the breakdown of a variety of records for every dimension. If you would like you’ll use the share still.
Read about Tableau Date Functions with Examples
Drag “Number of records” on Row shelf and Region on “Color” still as on “Text Label” cards. Duplicate the sheet and replace the Region Dimension by your class Dimension. The sheet can appear as if the below image.

Sankey Chart in Tableau

Step.13 Creating Sankey Chart in Tableau

Step 14:
Drag all the 3 sheets into Tableau dashboard. Placed your Region Sheet on the manus aspect and class sheet on the proper aspect. Place Tableau Sankey chart in between each the sheets.
Go to Dashboard->Actions->Add Actions->Select Highlight Action. Certify you ought to choose “Hover” Action. This will highlight the whole Tableau Sankey chart on Mouse hover.

Step 15:
The Final output can appear as if the below image.

Tableau Sankey Chart

Step.15 Create Tableau Sankey Chart

This was all on Tableau Sankey Chart. Hope you like our Explanation.

4. Conclusion

Hence, in this tutorial we learned about the What is Sankey chart in Tableau, how to make Tableau Sankey chart, and a stepwise procedure to create them. Furthermore, if you have any query, feel free to ask in a comment box.

Related Topic – Tableau LOD – Level of Detail Expression

For reference –

Tableau
Tableaulearners

You give me 15 seconds I promise you best tutorials
Please share your happy experience on Google

follow dataflair on YouTube

9 Responses

  1. Sarwagya Jha says:

    how do we create multi level sankey?
    I want to create a sankey diagram to show supply chain

  2. Shivanand says:

    Thanks

  3. Swagat Jena says:

    Hi Team,
    I really appreciate your work here. But i do recognize this piece as it looks/ is the replica of Rajeev’s work. But i couldn’t find the due credits given to him.
    Is it a miss from your end, if so then please give him the due credits or ek se create something of your own and stop copying

  4. Shanice says:

    Hi Sarwagya, I hope you were able to create a multi-level sankey diagram. I am looking to do the same however, I am unsure of how to do so.

    Kind Regards,
    Shanice

  5. Vaishnavi says:

    After creating the sankey chart if we want to change the color coding how can we do that?

  6. Vaishnavi says:

    After creating the sankey chart if we want to change the color coding how can we do that?

  7. Markus N. says:

    Very unclear in Step 2: That given calculation ‘IF [Order Date] = THEN one else forty-nine finish’ is definitely not helping.

  8. Axel says:

    Hello,
    What about a 3-D Sankey diagram? Is there any tutorial to design it in Tableau?
    Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *