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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

[Sankey Diagram]the nodes are placed in random that make it hard to figure out the actual data flow.

Hi team, 

I really enjoy making Sankey Diagram in PowerBI step by step, and I come up with a Sankey by following below steps.

1. Data before transform

 

2. Data after transform to Source, Target and Value by below script

Sankey =
UNION(SUMMARIZE(SELECTCOLUMNS(userscenario,"Source",userscenario[UID],"Target",userscenario[SID]),[Source],[Target],"Occurs",COUNTROWS(userscenario)),SUMMARIZE(SELECTCOLUMNS(userscenario,"Source",userscenario[SID],"Target",userscenario[MID]),[Source],[Target],"Occurs",COUNTROWS(userscenario)),SUMMARIZE(SELECTCOLUMNS(userscenario,"Source",userscenario[MID],"Target",userscenario[PID]),[Source],[Target],"Occurs",COUNTROWS(userscenario)),SUMMARIZE(SELECTCOLUMNS(userscenario,"Source",userscenario[PID],"Target",userscenario[STEP1]),[Source],[Target],"Occurs",COUNTROWS(userscenario)),SUMMARIZE(SELECTCOLUMNS(userscenario,"Source",userscenario[STEP1],"Target",userscenario[STEP2]),[Source],[Target],"Occurs",COUNTROWS(userscenario)),SUMMARIZE(SELECTCOLUMNS(userscenario,"Source",userscenario[STEP2],"Target",userscenario[STEP3]),[Source],[Target],"Occurs",COUNTROWS(userscenario)),SUMMARIZE(SELECTCOLUMNS(userscenario,"Source",userscenario[STEP3],"Target",userscenario[STEP4]),[Source],[Target],"Occurs",COUNTROWS(userscenario)))
 
 

 

3. The Sankey Diagram created based on Source, Target , Value. 

 

 

As you see, the nodes' place actually is wrong, which makes it hard to figure out the actual data flow. Is there any workaround to get rid of this issue instead of manually drag and drop the nodes (because there'll be lots of nodes need to move and it's hard to figure out where to move them to)???

 

Thanks,

Cherie

 

1 REPLY 1
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

As I don't know how all of your data looks like. I gusse the issue should be related to your data. BTW, you can refer to the online document about this visual.

https://powerbi.microsoft.com/en-us/blog/visual-awesomeness-unlocked-sankey-diagram/

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.