Forum Discussion

g0ldfinch's avatar
g0ldfinch
Copper Contributor
Dec 06, 2023

Hierarchy processing in PowerQuery

I need to process a hierarchy with the following columns: ID, PARENT, and TEXT. My goal is for any given node except the top one to display concatenation of the the text fields to show the path leading to the current node. E.g.

IDPARENTTEXTpath
10Application Platform 
21Supporting components for APApplication Platform | Supporting components for AP
31Directory Structure for APApplication Platform | Directory Structure for AP

What is the optimal way to do it? Looks like i need a recursive function, but, without an index on the ID column this will be slow...

Resources