Traverse parent-child relationship in power query

Hi everyone,

I have a scenario where I have parent-child relationship. In the picture below, you can see that Account is the parent of Client and Account is the Child of Advisor. So, if we change anything in the Advisor, Client will be impacted. However, in the current setup, if I filter on Advisor, it will show only impact of Account and not on client. How can I do this in power query so that I get all the nodes in the hierarchy?

@Melissa can you please look into this? I have tried but could not make it work.

image

recursive m code.pbix (25.2 KB)