Forum Discussion

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi emutuc ,

    This problem usually occurs because you use recursion in your query (that is, a function that calls itself).
    Previously, when you had less data, you could use recursion to calculate Power Query, so it was able to run before. However, as you append more data, the number of queries that Power Query needs to process will increase exponentially until it reaches its processing limit, and then an error will occur.

    The general solution is to group the data first, and then recurse on the data in each group, so that the amount of data that needs to be processed each time recursion is much smaller. Or you can go back to the data source and implement recursion in the data source, because the data source will have much stronger processing power than Power Query.

    In addition, I found this blog that may be helpful:
    https://blog.crossjoin.co.uk/2024/01/28/understanding-the-evaluation-resulted-in-a-stack-overflow-error-in-power-query-in-excel-and-power-bi/ 

    Best Regards,
    Dino Tao
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.