Forum Discussion
How do I create Sankey Chart from two table data?
- 2 years ago
Step 0: I use these DATA Tables below. (I add some dammy data to 'Shop Transactions' table.)
Step 1: I add a column to these 2 tables each.
Step 2: I merge 2 tables.
- Before -
- After -
Step 3: I sort 'Shop Transactions' table with 'shop no' column and 'date'column.
Step 4: I fill down 'Parent' column.
Hi pbsamar
Based on your desired result, it looks like a Decomposition Tree is more what you are after rather than a Sankey Diagram?
Either way, there's no way to relate the Shops in the first table to the Districts. How do you know which District the Shop1 and Shop21's belong to?
Regards
Phil
Hi PhilipTreacy
Based on 'date' from "Shop Transactions" and 'start date' from "Organization Tree" , a 'region' column need to be
created, which should look like :
| date | shop no | check | sale amount | Region |
| 2-Jun-24 | shop1 | 1 | 10 | district1 |
| 3-Jun-24 | shop1 | 2 | 20 | district1 |
| 4-Jun-24 | shop1 | 3 | 30 | district1 |
| 5-Jun-24 | shop1 | 4 | 40 | district2 |
| 6-Jun-24 | shop1 | 5 | 50 | district2 |
| 7-Jun-24 | shop1 | 6 | 60 | district2 |
| 2-Jun-24 | shop2 | 1 | 10 | district1 |
| 4-Jun-24 | shop2 | 3 | 30 | district1 |
| 5-Jun-24 | shop2 | 4 | 40 | district1 |
| 6-Jun-24 | shop2 | 5 | 50 | district1 |
| 7-Jun-24 | shop2 | 6 | 60 | district1 |
| 2-Jun-24 | shop21 | 1 | 1 | district2 |
| 3-Jun-24 | shop21 | 2 | 2 | district2 |
| 4-Jun-24 | shop21 | 3 | 3 | district2 |
| 5-Jun-24 | shop21 | 4 | 4 | district1 |
| 6-Jun-24 | shop21 | 5 | 5 | district1 |
| 7-Jun-24 | shop21 | 6 | 6 | district1 |
| 3-Jun-24 | shop22 | 2 | 20 | district2 |
| 4-Jun-24 | shop22 | 3 | 30 | district2 |
| 5-Jun-24 | shop22 | 4 | 40 | district2 |
| 6-Jun-24 | shop22 | 5 | 50 | district2 |
| 7-Jun-24 | shop22 | 6 | 60 | district2 |
Regards,
pbsamar