EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 360+ Courses All in One Bundle
  • Login
Home Data Science Data Science Tutorials Tableau Tutorial Sankey Chart In Tableau
Secondary Sidebar
Tableau Tutorial
  • Charts
    • Tableau Charts
    • Tableau Bar Chart
    • Tableau Chart Types
    • Donut Chart in Tableau
    • Tableau Gauge Chart
    • Funnel Chart in Tableau
    • Gantt Chart in Tableau
    • Bubble Chart in Tableau
    • Pareto Chart in Tableau
    • Sankey Chart In Tableau
    • Stacked Bar Chart in Tableau
    • Tableau Bullet Chart
    • Waterfall Chart in Tableau
    • Line Chart in Tableau
    • Heat Map in Tableau
    • Histogram in Tableau
    • CrossTab in Tableau
    • Treemap in Tableau
    • Trend Lines in Tableau
    • Tableau Reference Lines
    • Tableau Dual Axis
    • Legend in Tableau
    • Pie Chart in Tableau
    • Tableau Storyline
  • Basic
    • What is Tableau
    • What is Tableau Dashboard
    • What is Tableau Server
    • Uses of Tableau
    • Tableau Versions
    • Tableau Architecture
    • Is Tableau Free
    • Tableau New Features
    • How To Install Tableau
    • How to Use Tableau?
    • Install Tableau Server
    • Tableau Commands
  • Statement
    • Tableau IF Statement
    • Case Statement in Tableau
  • Functions
    • Tableau Functions
    • Tableau String Functions
    • Concatenate in Tableau
    • Rank Function in Tableau
    • Tableau Aggregate Functions
    • Window Sum Tableau
    • LOD Expressions in Tableau
    • LOOKUP Function in Tableau
    • Tableau Fixed Function
    • Tableau Count Distinct
    • Tableau Window Functions
  • Sort/Filters
    • Sorting in Tableau
    • Filters in Tableau
    • Types of Filters in Tableau
    • Tableau Action Filter
    • Context Filter in Tableau
    • Tableau Parameter Filter
    • Adding Filters in Tableau Dashboard
    • Tableau Context Filter
  • Tableau Dashboard
    • Dashboard in Tableau
    • Tableau Dashboard Examples
    • Tableau Dashboard Creation
    • Tableau Dashboard Design
    • Tableau Workbook
  • Advanced
    • Tableau Bins
    • Tableau 3D
    • Tableau Export to Excel
    • Tableau Reporting
    • Tableau Reader
    • Tableau Map
    • Tableau Viewer
    • Tableau Prep Builder
    • Tableau Bridge
    • Tableau Tooltip
    • Tableau Hyper
    • Tableau Zen Master
    • Tableau Union
    • Tableau Templates
    • Tableau Alerts
    • Tableau Reporting Tool
    • Conditional Formatting in Tableau
    • Tableau Web Data Connector
    • Tableau BI Tool
    • Data Blending in Tableau
    • Parameters in Tableau
    • Tableau Data Sets
    • Creating Set in Tableau
    • Tableau Drill Down
    • Tableau Dynamic Parameters
    • Tableau Table Calculation
    • Tableau Visualization
    • Tableau Joins
    • Pivot in Tableau
    • Data Visualization With Tableau
    • Forecast in Tableau
    • Map Layers in Tableau
    • Group in Tableau
    • Tableau Group by
    • Hierarchy in Tableau
    • Sets in Tableau
    • How to create a Set in Tableau
    • Tableau Order of Operations
    • Tableau User Group
    • Tableau Calculated Field
    • Custom SQL in Tableau
  • Interview Questions
    • Tableau Interview Questions

Sankey Chart In Tableau

By Priya PedamkarPriya Pedamkar

Sankey Chart In Tableau

Introduction to Sankey Chart In Tableau

Sankey chart in the tableau is a great diagram. This diagram will show the flow and relationship between two different elements. These two different elements are called nodes and relationship or connection between two different elements called as links. When we have two different dimensions (it is qualitative data or description of data) and want to know the relationship between them or mapping then the Sankey chart is the best way to use. Three major points in the Sankey chart are Target, Source, and Size. These three parameters will generate the Sankey chart.

How to Create a Sankey Chart in Tableau?

There are two ways to create Sankey chart:

Start Your Free Data Science Course

Hadoop, Data Science, Statistics & others

1. Using a Sankey Template

  • https://public.tableau.com/views/..
  • Go to download and download the template. Save the template to your desktop.
  • Open tableau desktop or public version.
  • Go to the File->Open->Open download templated.

Sanky Chart In Tableau image 1

  • The Below window will appear once the template gets loaded into the tableau.

Sanky Chart In Tableau image 2

  • Click on the new data source and connect to the database (we have referred to the sample superstore database).

Sanky Chart In Tableau image 3

  • Once we retrieved the data source, the below window will appear.

Sanky Chart In Tableau image 4

  • Drag orders table into Drag sheets here twice to form a union.

Sanky Chart In Tableau image 5

  •  Go to the worksheet where we can see the Sankey template and data source.

Sanky Chart In Tableau image 6

  • We have renamed city dimension to the source, sub-category to target and sales to size. The table name is generated automatically.

Sanky Chart In Tableau image 7

  • Select Sankey template->right click->Replace Data Source

Sanky Chart In Tableau image 8

Sanky Chart In Tableau image 8.2

  • Go to the Sankey template and we can see data we have loaded.

Sanky Chart In Tableau image 9

  • We can look at below source and target

Sanky Chart In Tableau image 10

  • Sales i.e. size for each sub-category(target) and city(source).

Sanky Chart In Tableau image 11.1

Sanky Chart In Tableau image 11.2

2.With Calculated Field

  •  Open data source -> go to dimension->click on Create Calculated Field.

Calculated Field img1

  • This is X-axis.

Calculated Field img2

  • Make the second calculated field as given below image.
  • These two calculations are telling the tableau were to put a line. These calculations are graphically meaningful. The Region on left side and category on the right side, draw the connection between these two categorial.1 and 49 is for drawing a curve.

Calculated Field img3

  • Transfer the data between the interval of 0 and 1.

Calculated Field img4

  • Select To pad->Create->Bins

Calculated Field img5

  • Put value as 1 in Size of Bins

Calculated Field img6

  • A new to pad(bin) dimension will get created.

Calculated Field img7

  • Create Rank1 and Rank2 calculated field for the curve.

Calculated Field img8

Calculated Field img8.2

  • Create a calculated field named Curve. Showing curvature between the elements.

Calculated Field img9

  • To define the size of the curve. More number of records = Thicker curvature and Less number of records = Thinner the curvature.

Calculated Field img10

  • Drag T (measure to columns)->compute using->To pad(bins)

Calculated Field img11

  • Drag category and region into Details (Marks card)

Calculated Field img12

  • Drag curve to rows.

Calculated Field img13

  • Go to the curve->edit table calculations.

Calculated Field img14

  • Select Rank1->Specific Dimensions->select below given all dimensions. You can see values on the right side

Calculated Field img15

  • When we want to see values on both the side. Change the order flow of rank2. Shown in the image below.

Calculated Field img16

  • Select the T dimension and the chart will be different.

Calculated Field img17

  • Once the T curve is applied, we see some curvature in the below image.

Calculated Field img18

  • We must do some formatting to chart.
    1.To pad(bin)->Path
    2.Category -> color
    3 Region->Label
    4 Drag Size->Size (Marks card)
    5.Size->Compute Using->To pad(bin)

Calculated Field img19

  • The Below image will appear once we are done with the formatting mentioned above.

Calculated Field img20

  • Open new worksheet->drag Category into color->drag number of records into rows. The below image will be created.

Calculated Field img21

  • Duplicate the previous sheet drag region into color->drag number of records into rows.
    The below image will be created.

Calculated Field img22

  • We will create a dashboard for the Sankey chart.
  • Drag sheet1 to the dashboard.
  • Drag sheet 2 (category) to the dashboard.
  • Drag sheet 3 (region) to the dashboard.
  • Hide sheet title.
  • Hide all the filters like categories, regions.

Calculated Field img23

  • As we have hidden the category details, but when we move arrow onto a category. We will get the number of records in each category.

Calculated Field img24

  • As we have hidden the region details, but when we move the arrow region. We will get the number of records in each region.

Calculated Field img25

  • We can see Sankey with different the dimension of how data and Sankey chart changes.
  • We have made a change into the To pad. Data is retrieved for city and category.

Calculated Field img26

  • A city with a number of records

Sanky Chart In Tableau Calculated27

  • Category with a number of records.

Sanky Chart In Tableau Calculated 28

  • We have created a dashboard for city and category dimensions with the Sankey chart.

Sanky Chart In Tableau Calculated 29

Sanky Chart In Tableau Calculated 29.2

Conclusion

We have seen what is Sankey Chart In Tableau and how to create it with two different dimensions. Whenever we need to map data with different dimensions Sankey chart is the best-suited way. It helps us show the mapping source and target with the help of the size.

Recommended Articles

This is a guide to Sankey Chart In Tableau. Here we discuss two different ways to create a Sankey chart one is by using Sankey Template and the second is by using Calculated Field in a tableau along with the steps. You may also look at the following articles to learn more-

  1. Tableau Reference Lines
  2. Tableau Table Calculation
  3. Tableau Dashboard Creation
  4. Parameters in Tableau
Popular Course in this category
Tableau Training (8 Courses, 8+ Projects)
  8 Online Courses |  8 Hands-on Projects |  55+ Hours |  Verifiable Certificate of Completion
4.5
Price

View Course

Related Courses

Business Intelligence Training (12 Courses, 6+ Projects)4.9
Data Visualization Training (15 Courses, 5+ Projects)4.8
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Database Management
  • Machine Learning
  • All Tutorials
Certification Courses
  • All Courses
  • Data Science Course - All in One Bundle
  • Machine Learning Course
  • Hadoop Certification Training
  • Cloud Computing Training Course
  • R Programming Course
  • AWS Training Course
  • SAS Training Course

ISO 10004:2018 & ISO 9001:2015 Certified

© 2023 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more