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
Shahashesh
Helper III
Helper III

How to dynamically solve the sankey chart requirement if the data is recursive

Hi All,

I have implemented the solution provided in below post by @v-jianboli-msft  and it is working fine. But here wanted to check till how many levels it will work dynamically if we more levels gets added in the data?

Secondly if the data is recursive then how we can solve it dynamically?

 

Earlier Post link - 

https://community.powerbi.com/t5/Desktop/Need-to-create-sankey-chart-in-power-bi-but-data-is-not/m-p...

 

Thanks!

Ashesh Shah

2 REPLIES 2
v-rzhou-msft
Community Support
Community Support

Hi  @Shahashesh ,

 

Accoridng to your statement, I know your logic is to only show the values equal to or after the select level. EX: If we select "ELE1725" and "MET1308", you want to only see the steps after them instead of all steps contain "KPI0977".

So I think measure from  @v-jianboli-msft should be a good way to achieve your goal. You need to add the comparisons int your measure manually.

Here I suggest you to add "KPI0977" into [Destination] column and then use below function to get parent and child path, and then you can get to know how many levels you have.

 

Path = PATH('Table'[Destination],'Table'[Source])
PATHLENGTH = PATHLENGTH('Table'[Path])

 

RicoZhou_0-1663833351696.png

 

Best Regards,
Rico Zhou

 

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

 

Hi @v-rzhou-msft 

When i am trying to use path function but it says error as "Missing Data in source and destination". So as per error i can understand there is some missing data. Is there any other way to solve it?

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.