top of page
Bernard K

How to Create Sankey Chart in Tableau

How to create a sankey chart in tableau

Introduction

Sankey chart is a type of flow diagram that visually depicts the flow of energy, materials, or costs from one state or stage to another. It is named after Irish Captain Matthew Henry Phineas Riall Sankey, who used this type of diagram in 1898 to show the energy efficiency of a steam engine.

The key features of a Sankey chart are:

  • Nodes: The start and endpoints of each flow are called nodes.

  • Links: The flow paths between nodes are called links. There can only be one link between a pair of nodes.

  • Link Width: The value of the flow between each pair of nodes is encoded by the width of the link. The wider the link, the greater the flow.

  • Colors: Coloring the links helps establish visual mapping with their respective nodes.

When to use Sankey chart?

Sankey charts are useful for visualizing:

  • The customer journey from initiation to purchase.

  • Movement of stock in a supply chain.

  • Website traffic flow and user journey.

  • Energy inputs, useful output, and wasted output.

  • Material flows and cost breakdowns.

How to build a Sankey chart in Tableau?

With Tableau viz extensions, building a Sankey chart has been simplified. In fact, you can build a Sankey chart in just 30 seconds. To demonstrate this, I will be using the Sample – Superstore dataset to show Sales flow between different product categories.

Once you’ve connected your dataset,

  • Under marks card, select Add Extension.

  • Choose Sankey on the available list of extensions and open it.

adding tableau viz extensions

Next drag the three dimensions (Segment, Category, & Sub-Category) to the Level shelf.

Note, this gives us a sketch of Sankey chart - which lacks the link width (i.e., value of flow between nodes).

sample sankey chart build in tableau

To add link width, drag the measure of interest (in this case Sales) to the Link shelf. This results to the view below.

(Note, the link widths adjust to emphasize the value of flow, the wider the link the greater the sales value)

You can further customize your Sankey chart under the Format Extension  option - making changes such as level of appearance, behavior, labels and even changing the color palette.

formatting sankey chart in tableau

For example, the above Sankey chart could be formatted and presented as follows.

final sankey chart build in tableau

Conclusion

In summary, Sankey charts provide an intuitive way to visualize flows and processes, with the link widths emphasizing the magnitude of each flow. They are widely used in science, engineering, and business to gain insights into complex systems and optimize processes.

If this post was helpful and you would like to receive more of these Tableau tips and tricks, kindly subscribe to our mailing list below.

If you like the work we do and would like to work with us, drop us an email on our contacts page and we’ll reach out!

Thank you for reading!

Comentarios


Blog.png
Black & white.jpg

About Me

More About the Author

Bernard K

Analytics Consultant | 3X Tableau Certified

Bernard is a data analytics consultant helping businesses reveal the true power of their data and bring clarity to their reporting dashboards. He loves building things and sharing knowledge on how to build dashboards that drive better outcomes.

Let’s discuss your data challenges! Let’s work together!

bottom of page