Legacy connections is gone, the first step isn't needed anymore to union tables. Drag the first sheet over, then grab the same sheet again (second one) and drop it ontop the first one to create the union. You'll notice your rows number double, and Tableau will create a column called Table Name on the far right that labels the 2 unions for you ( a '1' is added to the name, you'll see when you scroll down to the bottom half). You won't need to do the Custom SQL now because it does this making the Table Name column. This tutorial worked very will for me, thank you.
Amazing tutorial! I was quite intimidated by the Sankey chart when I firt saw it a few days ago. It looked fascinating but I thought, as a beginner at Tableau, Sankey is way above my level and it would be months before I can actually make one. Even with this tutorial it is a tricky chart to get right. I had to watch this video over and over to get the calculations right. I feel so great now that I have actually made a Sankey chart showing the flow of CO2 from world regions to each year from 1960 to 2011, with actions enabled for regions and years on the Dashboard. I learnt an aweful lot here, thanks to the clean instructions in this tutorial. Sankey is a such a great chart to show so many variables in a single screen.
This is a flipping cracking video, thanks very much. I've managed to get a great looking sankey. Although I don't really understand the maths behind the sigmoid/curve/t calculations, that's more to do with my ignorance of statistics! 10/10
This is a fantastic method to follow. I love this method of visualization and this video was exactly what I needed to add Sankey charts to my arsenal of options. Thank you!
Awesome, thank you Jeremy for your feedback! Check the whole custom chart series when you have time, we put an effort to it, hope you will find our tutorials helpful. Have a nice day!
Thanks a lot. It worked for me EVEN I was working with count and percent of total of count. Thanks Thanks. Even sankey extension is of no use in my case . As handling with bigger data, I just adjusted my axis accordingly. But step by step explanation made easier to play around. Thanks a bunch.
what if there's a 3 levels of relationship? for example, Product category level 1 vs level 2 vs level 3. Can still work? Appreciate if record a advanced videos fro this example. :)
Thank you for the tutorial. It well explained. I had some problems using when the segment had a region that was NULL. The color sequence was not working properly. This was resolved when the assigned a value to the region.
Great tutorial! I love the detailed explanation since I have been trying to build a Sankey chart for two days now - in the end I managed, but this video really made me understand a lot of those things that you are otherwise supposed to follow blindly. In this respect, I have a question: what is the rationale behind having to double the dataset? I am not sure I understand that, could you please elaborate a bit?
Doubling it is to setup the LEFT and RIGHT bars of the diagram using the same dataset. Essentially, looking at co-relation of Segment vs Region within that single dataset.
Amazing, I just did one as per your instructions (however my case was from segments to segments- different segment categories, and for market potential as opposed to sales) :D
For the first part of the video, since custom SQL connections has been disabled by Tableau and the newer versions do not have this option you can do the following (For tableau desktop public-2022.4): 1. Create duplicate sheets on the excel file (datasource already had sheets duplicated) 2.open the connection excel on tableau 3.drag sheet1 and click on union then drag the other sheet 4.Now you have doubled your data with the last column on the preview showing table_name and cells reflecting which table the data came from sheet1 or sheet2. 5.Create new calculated field in the preview section and use IF ELSE to categorize sheet1 as "Segment" and other sheet as "Region" (Use IF else statement) and name this column as 'Vizside' 6.Now proceed to timestamp 4:39 of the video.
@@mazenkovski For the first part of the video, since custom SQL connections has been disabled by Tableau and the newer versions do not have this option you can do the following (For tableau desktop public-2022.4): 1. Create duplicate sheets on the excel file (datasource already had sheets duplicated) 2.open the connection excel on tableau 3.drag sheet1 and click on union then drag the other sheet 4.Now you have doubled your data with the last column on the preview showing table_name and cells reflecting which table the data came from sheet1 or sheet2. 5.Create new calculated field in the preview section and use IF ELSE to categorize sheet1 as "Segment" and other sheet as "Region" (Use IF else statement) and name this column as 'Vizside' 6.Now proceed to timestamp 4:39 of the video.
For the first part of the video, since custom SQL connections has been disabled by Tableau and the newer versions do not have this option you can do the following (For tableau desktop public-2022.4): 1. Create duplicate sheets on the excel file (datasource already had sheets duplicated) 2.open the connection excel on tableau 3.drag sheet1 and click on union then drag the other sheet 4.Now you have doubled your data with the last column on the preview showing table_name and cells reflecting which table the data came from sheet1 or sheet2. 5.Create new calculated field in the preview section and use IF ELSE to categorize sheet1 as "Segment" and other sheet as "Region" (Use IF else statement) and name this column as 'Vizside' 6.Now proceed to timestamp 4:39 of the video.
Hey AoV thanks for the tutorial, just want to know if not do a UNION ALL in custom query, would that be valid to do the dashboard actions on highlighting, especially from right to the left, as mine was not include a custom union all, and can only highlight the dashboard from left to right.
10/10 for creativity, but this is SOOO complex! Obviously Tableau wasn't meant to do vizzes like this. It's more like one giant workaround to trick Tableau into do this!
This is not the simplest task we agree. And you can do this with different software without these complicated steps. But one of the most important strengthens of Tableau is interactivity. If you want interactive dashboard with Sankey diagram, it would be easier to do with Tableau even with this workaround.
Thanks. But I'm unable to get the same outcome at 7:06 of the video that changes "t" to compute using "Padded". I get only two dots to the left of the axis ranging from -6.2 to zero, rather than 49 dots evenly distributed across the axis ranging from -6.5 to 6.5. Hope you can kindly advise. (I'm using Tableau 10.5.2)
Hi Ji, You need to check whether your ToPad calculated field has been created correctly, and ensure that the Padded bins are then recreated with the size of bin = 1.
Cool video, and i hv taken ur class on udemy. What i think would be an awesome class to develop is a how do u do this class. Example: how do u create a header. Simple right not really - u hv to create a calculated field. Most ppl would call it tips and tricks. The problem with tableau everything is a tip and trip. If u fully understand the basics other other stuff wrks itself out
@Art of Visualization Great manual, thanks! I have a question - if i want to sort this groups on the left and on the right side of sankey by descending what should i do with the sankey?
This is brilliant. I wonder if there is anyway to allow the lines to be gradient as they go across the t x axis. It would probably be too trippy to look at unless you had a small amount of left and right side variables.
Did it! It is wild, but by putting the t pill on columns twice and then making the first x axis be -5 to 0 and the second be 0 to 5, and then editing the t and t(2) mark cards instead of the All cards, I've got myself a very wild sankey.
Hi There! Thanks for this amazing work! Is there a tutorial for how to make a multi-step sankey somewhere? Your video is amazing and the easiest way I have found to reduplicate with all my data. Basically, I would need a third section, like county as a third addition to region and segment. Any way I might go about this or anyplace you would recommend? I sent you an email as well! Thanks so much!
Union needs to be the same data type too :), header has to be spelled the exact same, same order per selectstatement. great work, this is very helpful.
@7:06 if your not getting 49 circles, move your padded to field to rows and ensure "Show Missing Values" is checked. Then move it back. to details. Spent HOURS trying to figure out what was wrong.
Great video! Extremely clear presentation of complex material. I wonder if you know of any way to build a sankey diagram using tagged "unstructured data" maybe filtered through a sql relational database? I am trying to visualize hypothetical flows of chemical elements or compounds reported at different process stages in a bounded industrial life cycle.
Hi John, thank you for your comment! You will need to structure data anyway in order to visualize it using Sankey diagram. So these two topics are not related to each other
Great video! Is there a way to label the curve lines with its corresponding percentage numbers just like to label texts on the two bar charts on the sides?
HI Wellman809, It is possible, though with some nuance. Because we're not showing the entirety of the line, getting Tableau to properly display the label can be a bit tough. I would recommend creating a calculated field based on the [t] value, which you can then pass Sales Sizing through to. It would look something like this: If [t] = -5 then [Sales Sizing] end. You could have it show up on both -5 and 5, but the number will be the same in both cases. You'll then need to manually adjust where the label appears to make sure it's visible, but this should give you what you need.
Hi there, thanks for the excellent video which I used as a good step by step guide to produce something I needed. However, unlike the continuous data such as "Sales" in this example, my application is on transition over two points in time across four discrete categories. Having a little bit of trouble with the final step of sizing the paths though. Could you please let me know how the sizing calculation would be for the discrete context? Much appreciated.
I am trying to do the Sankey chart but having horizontal bars on both the left and right sides, instead of stacked bar charts. What do I have to do to get that working?
Thanks for the video explanation!How did you set up the initial dataset? I am trying to follow your tutorial without having to recreate my current dataset, which is not aggregated at all. I believe I would have to sum and pivot my data to get it in the same format that you used.
Great tutorial. I have built the chart but I need to show the actual value of measure (in this case sales) in the Sankey chart tooltip. When I add the simple measure (no calculation), it is showing blank. Could you elaborate how to do this please?
The challenge is that the data for the three columns I want to use comes from different tables, and they are connected through data blending. how to proceed. Do you have any ideas how to perform union in this 3 tables or any other method instead of union?
Tableau no longer supports Legacy Connections, "Starting in Tableau 2019.1, you will no longer be able to create a new Legacy Excel or Text connection. Existing workbooks created with these legacy connections will continue to work until 2019.2, when all support for legacy connections will be removed." Do you know of a workaround for this?
I used excel to manually paste the data under the already existing data, and added the Viz column manually as well. Took me 2 minutes to do this. The other workaround is to download Tableau build prep, but I found the excel method way easier.
Great tutorial video! I have two questions regarding to the Sankey Diagram. The first one is Rank 1. Why we set up the Rank1 calculation as running_sum(sum(sales))/total(sum(sales))? And the second one is calculation of the curve. As we duplicate the Rank1 which means Rank1=Rank2. Then Rank2-Rank1=0*sigmoid. Can you please explain why Rank2 is the inverse of Rank 1? Thank you so much.
I am using Tableau 2021.3 version without legacy connection , My data values are doubled because I joined two excel files together to make sankey. How can I rectify that. Look forward to your speedy reply
Hey SuperDataScience Team, fantastic tutorial, I was able to build my own in minutes. I'm playing around trying to create a multi / poly sankey diagram. Have you a tutorial in the works for that or can anyone point me to a resource?
Hi Ronan, Thanks for adding to this thread. We are not currently creating a tutorial, though we will note your suggestion. Please see link below for instructions: community.tableau.com/thread/152115
Hi, can you please explain why the union is necessary. The concern I have is bloating the data model. Could you have not used just the segment and the region columns from the original dataset?
Hi! What a great tutorial - very intuitive and it almost brought me to my goal. I just have one question, please allow me to explain. When you end up with the aggregated sales in the end. Is there any way that you can display the underlying sales in a tooltip e.g. when hovering the line from segment to region? Example: If a line between segment 1 and region 1 consists of sales of 1.000$, 3.000$ and 5.000$ a total sum of 9.000$ will be displayed. But when hovering the line it would be nice to see the sum (9.000$) as well as the individual sales (1.000$, 3.000$, 5.000$). I appreciate your time. Thanks! /Chris
Hi Christoffer. We have not attempted this yet, but guess that you will need to make use of some complex level of detail calculations. For the Sales per line, it is quite straightforward, as the Sales amount is the Sales Amount table calculation multiplied by 2. You can just create a new table calculation and drop this into the tooltip shelf Let us know if you achieve the desired result with the overall sales per region.
This was a fantastic tutorial. I do have a question though. The data I want to plot is categorical (I want to visualize changes in major over a semester) so I only have counts of majors at the beginning and end, not a continuous variable like you use here (sales). I've got the chart all set up, relatively well by using the COUNT function instead of SUM function, but there is an alignment issue between the curves and the bar chart. So the people in Major A on the curve dip below the representative percentage on the bar chart. Any idea how I can modify for it to work?
Hi Laxgrl2787, quite difficult to tell without seeing all of the data and what you have done. What I would suggest, is to ensure that you use the correct function (COUNT) throughout your model.
Great tutorial! Instead of using the numbers in the Sales column, is it possible to use the total number for each segment (e.g. Commercial, Public, Residential) using the COUNT function? I've tried using this method in the Rank 1, Rank 2 calculated fields, but all i'm getting are straight lines. :(
Hi David. Thanks, we think it is great too :slightly_smiling_face: . Instead of COUNT function, you can rather still use the SUM aggregation but replace Sales with Number of records. Give that a try
Hi, Im trying to this this exact same diagram but I also need to compare the data through time. So I do have numbers (years) and they act like the "1, 2, 3, ...,49". I have the viz already, it's about renewable energy on 15 countries and its transition through time. BUT my problem is that the 3 lines of type or enegry start from each country but they end radomly not in 3 groups! Can someone help me? I used years as "padded"
Legacy connections is gone, the first step isn't needed anymore to union tables. Drag the first sheet over, then grab the same sheet again (second one) and drop it ontop the first one to create the union. You'll notice your rows number double, and Tableau will create a column called Table Name on the far right that labels the 2 unions for you ( a '1' is added to the name, you'll see when you scroll down to the bottom half). You won't need to do the Custom SQL now because it does this making the Table Name column. This tutorial worked very will for me, thank you.
Hey, i tried to do the same. But in Table name there were values of SalesData instead of segment. Could you tell me how to correct it ?
thank you for the comment, it saved my lot of time
this was the problem i tried to troubleshoot, but somehow I am too dumb for it ;( can anyone help out?
this worked perfectly for me, thank you!
During ToPad calculation, how should we write according to new "Table Name 1"?
Amazing tutorial! I was quite intimidated by the Sankey chart when I firt saw it a few days ago. It looked fascinating but I thought, as a beginner at Tableau, Sankey is way above my level and it would be months before I can actually make one. Even with this tutorial it is a tricky chart to get right. I had to watch this video over and over to get the calculations right. I feel so great now that I have actually made a Sankey chart showing the flow of CO2 from world regions to each year from 1960 to 2011, with actions enabled for regions and years on the Dashboard. I learnt an aweful lot here, thanks to the clean instructions in this tutorial. Sankey is a such a great chart to show so many variables in a single screen.
Can't thank you enough for this one. Great example. Good pace. Perfect level of detail (no pun intended). Brilliant.
Great Tutorial. Thanks for this awesome explaining of the Sankay Diagram in tableau.
Amazing, thank you for this tutorial. Very helpful
it is a great video to learn quickly sankey chart. awesome...amazing....
Incredible work! I always wondered how to make visualizations like these and this video came from heaven itself!
Thanks for your comment, Luis! Enjoy the content and please let us know if you would like to see any particular topics on our channel
You explained that so clearly. Had mines working by the time the video ended thanks!!!
wow thanks for this video! very useful for my internship
Great tutorial - clear, easy to follow, and even explaining why it works - nice work!
Hi Stephen,
Thanks for your feedback!
Thank you for this wonderful video on Sankey chart!
Tutorial very well done. BRAVO and thank you ! The visual effect is powerful
This is a flipping cracking video, thanks very much. I've managed to get a great looking sankey.
Although I don't really understand the maths behind the sigmoid/curve/t calculations, that's more to do with my ignorance of statistics! 10/10
Thanks for your fantastic feedback Scott!
Appreciate it
Extremely cool. Thanks for making this method so accessible.
You are most welcome Jimmy!
This is a fantastic method to follow. I love this method of visualization and this video was exactly what I needed to add Sankey charts to my arsenal of options. Thank you!
Awesome, thank you Jeremy for your feedback!
Check the whole custom chart series when you have time, we put an effort to it, hope you will find our tutorials helpful. Have a nice day!
love the tutorial... Bless you!
Great Tutorial. thanks for explaining this and trying to explain the calculated fields in a user friendly way.
that's amazing your Tableau skills
Thanks a lot. It worked for me EVEN I was working with count and percent of total of count. Thanks Thanks. Even sankey extension is of no use in my case . As handling with bigger data, I just adjusted my axis accordingly. But step by step explanation made easier to play around. Thanks a bunch.
Well done Sir! We will use your very technique to display data flows in an Asset Intelligence Center
Hi Holger,
Good luck to you!
Awesome -- exactly how tutorials should be done! Thanks so much!!
Thanks for your feedback Hipster! :D
Fantastic tutorial. Very helpful.
Wow Andy!
Thanks for your comment :)
Please to hear it from a Tableau Master
This is so helpful! Thank you!!
Will applied this. Going to add this sankey diagram to one of my favourite chart. Thx for the tutorial
You are most welcome Mia!
Great detail simple. This is a great way to learn will refer
could you make a sales forecast?
very well explained and very helpful. Thank you.
Great work! Thank you very much!
You are most welcome Ozan!
As I was looking for this chart. I could create it on Adobe Analytics, but was trying to figure out how to do it on Tableau. Thank you!
This, is absolutely superb. Thank you very much. Simply outstanding.
Great explanation it is good to learn how to do it.
Are most welcome Jean))))
Thank you. It was really helpful :)
Super helpful tutorial! Followed step by step and it gave me the chart I needed. Thank you! :)
Thank you for your comment Mengqiao!
Thank you soo much! I was able to do it easily!
That's great. I first time see the Sankey chart was through R but didn't realize Tableau can achieve that. I will try it later on.
Awesome, good luck to you!
what if there's a 3 levels of relationship? for example, Product category level 1 vs level 2 vs level 3. Can still work? Appreciate if record a advanced videos fro this example. :)
Hi Jason,
Yes, this is doable.
Thank you for your suggestion, we will think about more advanced way.
Amazing! It was so helpful ... thanks for preparing and sharing the lesson.
Thank you very much for all the help.
It's a great tutorial.
Regards.
Hi Miguel,
We are happy to help you!
Great tutorial. I have just started learning Tableau and I hope I will reach this point. Thanks a lot.
Thank you Mubashirulislam for your comment. Indeed, the topic is not the easiest. But with help of our courses, soon you will be able to make it.
Really well done! Thank you for making this.
THANK YOU FOR THE GUIDE
Glad you found the guide helpful!
Thank you for the tutorial. It well explained. I had some problems using when the segment had a region that was NULL. The color sequence was not working properly. This was resolved when the assigned a value to the region.
Very Well explained , comprenshive.
Thank for tuning in Archit
Amazing tutorial, really well explained step by step! Thank you :)
You are most welcome Melissa!
Brillaint but so complicated !
Whoever came out with this solution is a fking einstein
Amazing, great video!
Thank you, Harun for your comment!
Great tutorial! I love the detailed explanation since I have been trying to build a Sankey chart for two days now - in the end I managed, but this video really made me understand a lot of those things that you are otherwise supposed to follow blindly.
In this respect, I have a question: what is the rationale behind having to double the dataset? I am not sure I understand that, could you please elaborate a bit?
Doubling it is to setup the LEFT and RIGHT bars of the diagram using the same dataset. Essentially, looking at co-relation of Segment vs Region within that single dataset.
Amazing, I just did one as per your instructions (however my case was from segments to segments- different segment categories, and for market potential as opposed to sales) :D
Glad to know that it helped you out!
For the first part of the video, since custom SQL connections has been disabled by Tableau and the newer versions do not have this option you can do the following (For tableau desktop public-2022.4):
1. Create duplicate sheets on the excel file (datasource already had sheets duplicated)
2.open the connection excel on tableau
3.drag sheet1 and click on union then drag the other sheet
4.Now you have doubled your data with the last column on the preview showing table_name and cells reflecting which table the data came from sheet1 or sheet2.
5.Create new calculated field in the preview section and use IF ELSE to categorize sheet1 as "Segment" and other sheet as "Region" (Use IF else statement) and name this column as 'Vizside'
6.Now proceed to timestamp 4:39 of the video.
Amazing video, thanks.
Thank you for making such a helpful tutorial!
Muy bueno el Tutorial, Mil gracias!! me ayudo mucho y me enseño...
Eres bienvenido Camilo!
Nice! Thx you so much
Amazing tutorial, thanks so much :)
How do you convert to custom mySQL (2:29) now at 2022???? (this video is from 2017)
Did you find out how to do it?
@@mazenkovski For the first part of the video, since custom SQL connections has been disabled by Tableau and the newer versions do not have this option you can do the following (For tableau desktop public-2022.4):
1. Create duplicate sheets on the excel file (datasource already had sheets duplicated)
2.open the connection excel on tableau
3.drag sheet1 and click on union then drag the other sheet
4.Now you have doubled your data with the last column on the preview showing table_name and cells reflecting which table the data came from sheet1 or sheet2.
5.Create new calculated field in the preview section and use IF ELSE to categorize sheet1 as "Segment" and other sheet as "Region" (Use IF else statement) and name this column as 'Vizside'
6.Now proceed to timestamp 4:39 of the video.
For the first part of the video, since custom SQL connections has been disabled by Tableau and the newer versions do not have this option you can do the following (For tableau desktop public-2022.4):
1. Create duplicate sheets on the excel file (datasource already had sheets duplicated)
2.open the connection excel on tableau
3.drag sheet1 and click on union then drag the other sheet
4.Now you have doubled your data with the last column on the preview showing table_name and cells reflecting which table the data came from sheet1 or sheet2.
5.Create new calculated field in the preview section and use IF ELSE to categorize sheet1 as "Segment" and other sheet as "Region" (Use IF else statement) and name this column as 'Vizside'
6.Now proceed to timestamp 4:39 of the video.
Thanks a lot for excellent tutorial
You are most welcome, keep tuning in! :)
You are a god!
Ugh, thank you, I've been trying to find the name for these 😆
This is badass thank u
It was great tutorial. Thanks alot!
This helped a lot.. I am trying to make something like segment to region (most sales ) and to region (2nd most sales)
Hope you will succeed Meera! :)
Thank you. This helped a lot.
Hey AoV thanks for the tutorial, just want to know if not do a UNION ALL in custom query, would that be valid to do the dashboard actions on highlighting, especially from right to the left, as mine was not include a custom union all, and can only highlight the dashboard from left to right.
10/10 for creativity, but this is SOOO complex!
Obviously Tableau wasn't meant to do vizzes like this. It's more like one giant workaround to trick Tableau into do this!
This is not the simplest task we agree. And you can do this with different software without these complicated steps. But one of the most important strengthens of Tableau is interactivity. If you want interactive dashboard with Sankey diagram, it would be easier to do with Tableau even with this workaround.
I didi this but used an aws athena table, still worked great! just had to use custom sql to union them :)
Hello, I just find you're video but iIm french so I don't understand all you're video but thanks you for this Video
Thanks. But I'm unable to get the same outcome at 7:06 of the video that changes "t" to compute using "Padded". I get only two dots to the left of the axis ranging from -6.2 to zero, rather than 49 dots evenly distributed across the axis ranging from -6.5 to 6.5. Hope you can kindly advise. (I'm using Tableau 10.5.2)
Hi Ji, You need to check whether your ToPad calculated field has been created correctly, and ensure that the Padded bins are then recreated with the size of bin = 1.
THANK YOU SO MUCH!!
You are most welcome Hikaru!
Cool video, and i hv taken ur class on udemy. What i think would be an awesome class to develop is a how do u do this class.
Example: how do u create a header. Simple right not really - u hv to create a calculated field. Most ppl would call it tips and tricks. The problem with tableau everything is a tip and trip. If u fully understand the basics other other stuff wrks itself out
Thanks for your suggestion Joe!
We will definitely consider it!
@Art of Visualization Great manual, thanks! I have a question - if i want to sort this groups on the left and on the right side of sankey by descending what should i do with the sankey?
Great visualization! How can I get access to data set used for this visualization?
Great tutorial. I learnt a lot .Can you also make a tutorial video for Marimekko chart please? Thanks
Sure, I will ask instructors to prepare this tutorial.
Thank you for your suggestion Thao!
This is brilliant.
I wonder if there is anyway to allow the lines to be gradient as they go across the t x axis. It would probably be too trippy to look at unless you had a small amount of left and right side variables.
Did it! It is wild, but by putting the t pill on columns twice and then making the first x axis be -5 to 0 and the second be 0 to 5, and then editing the t and t(2) mark cards instead of the All cards, I've got myself a very wild sankey.
Really? Could you please share a screenshot?
Beatiful, thank you!!
You are most welcome Gengar!
Can I do this in Tableau public?
Hi There! Thanks for this amazing work! Is there a tutorial for how to make a multi-step sankey somewhere? Your video is amazing and the easiest way I have found to reduplicate with all my data. Basically, I would need a third section, like county as a third addition to region and segment. Any way I might go about this or anyplace you would recommend? I sent you an email as well! Thanks so much!
I'm interested in this also. Apparently there are third party extensions for purchase, but I would like to be able to do it on my own.
Union needs to be the same data type too :), header has to be spelled the exact same, same order per selectstatement.
great work, this is very helpful.
@7:06 if your not getting 49 circles, move your padded to field to rows and ensure "Show Missing Values" is checked. Then move it back. to details. Spent HOURS trying to figure out what was wrong.
非常感谢!😘
不用客气!
Great video! Extremely clear presentation of complex material. I wonder if you know of any way to build a sankey diagram using tagged "unstructured data" maybe filtered through a sql relational database? I am trying to visualize hypothetical flows of chemical elements or compounds reported at different process stages in a bounded industrial life cycle.
Hi John, thank you for your comment!
You will need to structure data anyway in order to visualize it using Sankey diagram.
So these two topics are not related to each other
Awesome visuals, but can you please include the detailed explanation as to why you do particular steps and how they align with the theory?
Great video!
Is there a way to label the curve lines with its corresponding percentage numbers just like to label texts on the two bar charts on the sides?
HI Wellman809, It is possible, though with some nuance. Because we're not showing the entirety of the line, getting Tableau to properly display the label can be a bit tough. I would recommend creating a calculated field based on the [t] value, which you can then pass Sales Sizing through to. It would look something like this: If [t] = -5 then [Sales Sizing] end. You could have it show up on both -5 and 5, but the number will be the same in both cases. You'll then need to manually adjust where the label appears to make sure it's visible, but this should give you what you need.
Hi there, thanks for the excellent video which I used as a good step by step guide to produce something I needed. However, unlike the continuous data such as "Sales" in this example, my application is on transition over two points in time across four discrete categories. Having a little bit of trouble with the final step of sizing the paths though. Could you please let me know how the sizing calculation would be for the discrete context? Much appreciated.
super cool!
Thanks for your comment! :)
I am trying to do the Sankey chart but having horizontal bars on both the left and right sides, instead of stacked bar charts. What do I have to do to get that working?
Thanks for the video explanation!How did you set up the initial dataset? I am trying to follow your tutorial without having to recreate my current dataset, which is not aggregated at all. I believe I would have to sum and pivot my data to get it in the same format that you used.
Hi depends on how your data came from originally.
Great tutorial. I have built the chart but I need to show the actual value of measure (in this case sales) in the Sankey chart tooltip. When I add the simple measure (no calculation), it is showing blank. Could you elaborate how to do this please?
The challenge is that the data for the three columns I want to use comes from different tables, and they are connected through data blending. how to proceed. Do you have any ideas how to perform union in this 3 tables or any other method instead of union?
Tableau no longer supports Legacy Connections, "Starting in Tableau 2019.1, you will no longer be able to create a new Legacy Excel or Text connection. Existing workbooks created with these legacy connections will continue to work until 2019.2, when all support for legacy connections will be removed." Do you know of a workaround for this?
We will check this out. Thanks for your notice.
Just duplicate the data with a cartesian join
Thanks! I spend 15 minutes looking for this option before I googled it! I should have read your comment first :)
PLEASE DO :( ! I use this set-up far too often now to just have it removed without a back-up option …..
I used excel to manually paste the data under the already existing data, and added the Viz column manually as well. Took me 2 minutes to do this. The other workaround is to download Tableau build prep, but I found the excel method way easier.
Great tutorial video! I have two questions regarding to the Sankey Diagram. The first one is Rank 1. Why we set up the Rank1 calculation as running_sum(sum(sales))/total(sum(sales))? And the second one is calculation of the curve. As we duplicate the Rank1 which means Rank1=Rank2. Then Rank2-Rank1=0*sigmoid. Can you please explain why Rank2 is the inverse of Rank 1? Thank you so much.
I am using Tableau 2021.3 version without legacy connection ,
My data values are doubled because I joined two excel files together to make sankey. How can I rectify that. Look forward to your speedy reply
simply wowiee
My professor is Jeffrey Shaffer😯
Hey SuperDataScience Team, fantastic tutorial, I was able to build my own in minutes. I'm playing around trying to create a multi / poly sankey diagram. Have you a tutorial in the works for that or can anyone point me to a resource?
Hi Ronan,
Thanks for adding to this thread.
We are not currently creating a tutorial, though we will note your suggestion.
Please see link below for instructions:
community.tableau.com/thread/152115
Hi, can you please explain why the union is necessary. The concern I have is bloating the data model. Could you have not used just the segment and the region columns from the original dataset?
Hi!
What a great tutorial - very intuitive and it almost brought me to my goal. I just have one question, please allow me to explain.
When you end up with the aggregated sales in the end. Is there any way that you can display the underlying sales in a tooltip e.g. when hovering the line from segment to region?
Example: If a line between segment 1 and region 1 consists of sales of 1.000$, 3.000$ and 5.000$ a total sum of 9.000$ will be displayed. But when hovering the line it would be nice to see the sum (9.000$) as well as the individual sales (1.000$, 3.000$, 5.000$).
I appreciate your time. Thanks!
/Chris
Hi Christoffer. We have not attempted this yet, but guess that you will need to make use of some complex level of detail calculations. For the Sales per line, it is quite straightforward, as the Sales amount is the Sales Amount table calculation multiplied by 2. You can just create a new table calculation and drop this into the tooltip shelf Let us know if you achieve the desired result with the overall sales per region.
Excellent
Thank you, Harun for your comment!
This was a fantastic tutorial. I do have a question though. The data I want to plot is categorical (I want to visualize changes in major over a semester) so I only have counts of majors at the beginning and end, not a continuous variable like you use here (sales). I've got the chart all set up, relatively well by using the COUNT function instead of SUM function, but there is an alignment issue between the curves and the bar chart. So the people in Major A on the curve dip below the representative percentage on the bar chart. Any idea how I can modify for it to work?
Hi Laxgrl2787, quite difficult to tell without seeing all of the data and what you have done. What I would suggest, is to ensure that you use the correct function (COUNT) throughout your model.
How do I add the column Vizside in Tableau Public Desktop since I am using the latest version of Tableau in 2024 and custom SQL is no longer an option
Great tutorial! Instead of using the numbers in the Sales column, is it possible to use the total number for each segment (e.g. Commercial, Public, Residential) using the COUNT function? I've tried using this method in the Rank 1, Rank 2 calculated fields, but all i'm getting are straight lines. :(
Hi David. Thanks, we think it is great too :slightly_smiling_face: . Instead of COUNT function, you can rather still use the SUM aggregation but replace Sales with Number of records. Give that a try
Hi, Im trying to this this exact same diagram but I also need to compare the data through time. So I do have numbers (years) and they act like the "1, 2, 3, ...,49". I have the viz already, it's about renewable energy on 15 countries and its transition through time. BUT my problem is that the 3 lines of type or enegry start from each country but they end radomly not in 3 groups! Can someone help me? I used years as "padded"