In v5.4.1, we’ve added the “Hierarchy path” action. It’s similar to the Path function in Power BI.
To calculate the path length, count the number of separators and add 1. For instance:
substringcount([Path], '|') + 1
To pick a particular item (node) from the path, use the pick() function. For instance:
pick(2, [Path], '|')