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.
Suppose we have a table like this one:
This table represents relationships between items:
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
1 | 2 | 1 |
1 | 3 | 1 |
2 | 5 | 1 |
3 | 5 | 1 |
4 | 5 | 1 |
5 | 6 | 1 |
7 | 9 | 2 |
8 | 10 | 2 |
9 | 11 | 2 |
10 | 11 | 2 |
Solved! Go to Solution.
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
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
Hey @v-shex-msft , thanks for the help! I´ll test both aproaches carefully and comeback with feedback.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |