Forum Discussion

armandprr92's avatar
armandprr92
Frequent Visitor
1 year ago
Solved

Multiple parents hierarchy - Find longest path

Hello, I have a multiple parents hierarchy and I would like to find the most time consuming path available.

 

In blue the original table and in orange the expected result.

 

I have found this function for finding the optimal path, but I've been unable to edit it to my needs. Dijkstra's Algorithm in Power Query

 

I'm quite lost right now.

 

Thank you very much for your help.

 

5 Replies

    • lbendlin's avatar
      lbendlin
      Super User

      Here is the PBIX file with your data and the algorithm you mentioned. The algorithm calculates the shortest path, not the longest path.

       

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi armandprr92,

    Thanks for reaching out to the Microsoft fabric community forum.

     

    It looks like you want to find the highest time consuming path in your data hierarchy. As lbendlin already provided a response to your query, please go through it and accept it as solution if it solves yours problem.

     

    I would also take a moment to thank lbendlin, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.

     

    If I misunderstand your needs or you still have problems on it, please feel free to let us know.  

    Best Regards,
    Hammad.
    Community Support Team

     

    If this post helps then please mark it as a solution, so that other members find it more quickly.

    Thank you.