Forum Discussion
DmitryKo
2 years agoHelper IV
Recursive relationships
Let's say we have a simple table for entities and their IDs (TableA) and another table that defines relationships in a format similar to this: IncomingID OutgoingID <some attributes that are...
scee07
2 years agoResolver I
Hi,
if this is a simple tree (every child has exactly one parent, and there are no cycles), then you can use PATH (https://learn.microsoft.com/en-us/dax/path-function-dax). If this hasn't changed, general graph structured are not covered by PATH.
If this is case, I would cross join all nodes and return the path from path.
If this is not the case, I reverted back to Power Query as Power Query is recursive and DAX is not. There you can implement graph search algorithms like DFS, BFS and then import the result to Power BI, ...
Best regards
Christian