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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Calculate members of a graph database type table with Power Query

Suppose we have a table like this one:

Table.PNG

This table represents relationships between items:

Case1.PNGCase2.PNG

 

My question is, how could be found the membership of each item with power query?

I´ve used a R script + igraph package with my porduction data but the result I get is a bit weird. I´d like to compare it with a native Power Query solution if this would be possible.

The result of the example should be:

FROM                                                                      TO                                                                 GROUP

121
131
251
351
451
561
792
8102
9112
10112

 

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @Anonymous ,

AFAIK, current power query not contains functions to analyze parent child relationship. You need to write a custom function to do loop through whole table to find out top node.

Please refer to following blog to know more about this:

Flattening A Parent/Child Relationship In Data Explorer (Power Query)

BTW, it is simple to analyst these on dataview side, you can use path function to achieve these:
Parent-Child Hierarchies

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @Anonymous ,

AFAIK, current power query not contains functions to analyze parent child relationship. You need to write a custom function to do loop through whole table to find out top node.

Please refer to following blog to know more about this:

Flattening A Parent/Child Relationship In Data Explorer (Power Query)

BTW, it is simple to analyst these on dataview side, you can use path function to achieve these:
Parent-Child Hierarchies

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Hey @v-shex-msft , thanks for the help! I´ll test both aproaches carefully and comeback with feedback.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.