EDUCBA

EDUCBA

MENUMENU
  • Explore
    • Lifetime Membership
    • All in One Bundles
    • Fresh Entries
    • Finance
    • Data Science
    • Programming and Dev
    • Excel
    • Marketing
    • HR
    • PDP
    • VFX and Design
    • Project Management
    • Exam Prep
    • All Courses
  • Blog
  • Enterprise
  • Free Courses
  • Log in
  • Sign up
Home Data Science Data Science Tutorials Tableau Tutorial Sankey Chart In Tableau

Sankey Chart In Tableau

Priya Pedamkar
Article byPriya Pedamkar

Updated March 21, 2023

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.

ADVERTISEMENT
Popular Course in this category
TABLEAU Course Bundle - 16 Courses in 1 | 2 Mock Tests

Start Your Free Data Science Course

Hadoop, Data Science, Statistics & others

How to Create a Sankey Chart in Tableau?

There are two ways to create Sankey chart:

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
ADVERTISEMENT
WINDOWS POWERSHELL Course Bundle - 7 Courses in 1
19+ Hours of HD Videos
7 Courses
Verifiable Certificate of Completion
Lifetime Access
4.5
ADVERTISEMENT
SALESFORCE Course Bundle - 4 Courses in 1
24+ Hours of HD Videos
4 Courses
Verifiable Certificate of Completion
Lifetime Access
4.5
ADVERTISEMENT
MINITAB Course Bundle - 9 Courses in 1 | 2 Mock Tests
35+ Hour of HD Videos
9 Courses
2 Mock Tests & Quizzes
Verifiable Certificate of Completion
Lifetime Access
4.5
ADVERTISEMENT
SAS PROGRAMMING Course Bundle - 18 Courses in 1 | 8 Mock Tests
123+ Hours of HD Videos
18 Courses
8 Mock Tests & Quizzes
Verifiable Certificate of Completion
Lifetime Access
4.5
Primary Sidebar
Footer
Follow us!
  • EDUCBA FacebookEDUCBA TwitterEDUCBA LinkedINEDUCBA Instagram
  • EDUCBA YoutubeEDUCBA CourseraEDUCBA Udemy
APPS
EDUCBA Android AppEDUCBA iOS App
Blog
  • Blog
  • Free Tutorials
  • About us
  • Contact us
  • Log in
  • Blog as Guest
Courses
  • Enterprise Solutions
  • Free Courses
  • Explore Programs
  • All Courses
  • All in One Bundles
  • Sign up
Email
  • [email protected]

ISO 10004:2018 & ISO 9001:2015 Certified

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

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
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
EDUCBA

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

Forgot Password?

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

🚀 Cyber Monday Reloaded Price Drop! All in One Universal Bundle (3700+ Courses) @ 🎁 90% OFF - Ends in ENROLL NOW