Forum Discussion
Recursive custom function in Dataflow
- Anonymous1 year ago
Hi Drshone ,
Here's a simplified way to identify where the ‘@’ symbol might be needed:
In your function, the recursive part seems to be in the fnAllParents definition. You can focus on this part.
In this part, the List.Generate function is used to create a list of tables, where each table represents a level in the hierarchy. Recursion occurs in the each clause of List.Generate.
To use the ‘@’ symbol, you can reference the function itself in the function definition. However, in Power Query M, the ‘@’ symbol is usually used to refer to the current scope of a function, especially nested functions. You should therefore make sure that the function reference is properly scoped and that there are no circular dependencies that would cause recursion to fail.
Best Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Drshone ,
Here's a simplified way to identify where the ‘@’ symbol might be needed:
In your function, the recursive part seems to be in the fnAllParents definition. You can focus on this part.
In this part, the List.Generate function is used to create a list of tables, where each table represents a level in the hierarchy. Recursion occurs in the each clause of List.Generate.
To use the ‘@’ symbol, you can reference the function itself in the function definition. However, in Power Query M, the ‘@’ symbol is usually used to refer to the current scope of a function, especially nested functions. You should therefore make sure that the function reference is properly scoped and that there are no circular dependencies that would cause recursion to fail.
Best Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.