Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
juddin
New Member

students migration by multi-level sankey graph

I have shared a sample data of students major migration. How can I organize this given data and create sankey graph on power Bi? seeking your help. thank you.

IDTERMMajor
12020Literature
12021History
12022History
12023Biology
22021History
22022History
22023History
22024Literature
32022Biology
32023Biology
32024Biology
42023Biology
42024Math
52024Math
62022Math
62023Biology
62024Computer
72024Computer
82020Literature
82021History
82022History
82023Biology
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @juddin ,

 

When creating a Sankey diagram in Power BI, you need to prepare a data table that contains these fields. For example, if you are tracking students' major migration, your data table might need to contain the students' IDs, their original majors (source), the majors they transferred into (destination), and the number of students who migrated in each semester (weight).


I did the following with the data you provided and create below measure, then created a Sankey chart based on it.

Migration Weight = COUNTROWS('Test')

vkongfanfmsft_0-1731050109843.png

vkongfanfmsft_1-1731050149208.png

 

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @juddin ,

 

When creating a Sankey diagram in Power BI, you need to prepare a data table that contains these fields. For example, if you are tracking students' major migration, your data table might need to contain the students' IDs, their original majors (source), the majors they transferred into (destination), and the number of students who migrated in each semester (weight).


I did the following with the data you provided and create below measure, then created a Sankey chart based on it.

Migration Weight = COUNTROWS('Test')

vkongfanfmsft_0-1731050109843.png

vkongfanfmsft_1-1731050149208.png

 

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you. It seems colse to my expectation. How did you sort out Destination column. My original dataset is too big. It is not possible to do manually. In addition, Blue line at right side showing no major.

MNedix
Super User
Super User

Then just watch that YT video and you should be alright.

 



If the post helped then please give it a Kudos and mark it as the solution so others can see it.
Cheers,
MNedix
Super User
Super User

Heya,

Do you (already) have a work or student Microsoft account? You can't really add the Sankey without one of those.

Check this YT: https://www.youtube.com/watch?v=T7lVEk9pWY8

 

Hope it helps.



If the post helped then please give it a Kudos and mark it as the solution so others can see it.
Cheers,

Thank you. But this is not right tutorial, I am expecting 

yes. I have student account. I want to create multi-level sankey graph

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.