Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi all,
I have an excel spreadsheet as a source for my Power BI dashboard that has been working perfectly for months. Today, for some reason I am getting "Expression.Error: Evaluation resulted in a stack overflow and cannot continue"
I haven't changed the source or query etc
Any help greatfully appreciated.
Solved! Go to Solution.
Hi @BarryFletcher ,
The reason for this problem is generally because, you are using recursion in your query (i.e. a function that calls itself appears).
When you had a small amount of data before, you were able to use recursion to calculate Power Query, so you were able to run it before. However, as the amount of data you are updating increases, the number of queries Power Query needs to process will increase exponentially until it reaches its processing limit, and then the error will occur.
The general solution is to Group by the data first, and then recurse on the data in each Group, so that the amount of data that needs to be processed for each recursion will be much smaller. Or you can go back to the data source and implement recursion in the data source, because the processing power of the data source will be much stronger than Power Query.
Also I found this blog that might be helpful:
Understanding the "Evaluation resulted in a stack overflow" error in Power Query in Excel and Power ...
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.
Hi all,
This is my file - I don't see any issues as outlined in the replies above - would appraciate if someone could take a look and help me out please?
https://drive.google.com/file/d/1LMuJGNIVpaD1e07MHXe77MpdAMWlETit/view?usp=drive_link
Much appreciated,
Barry
Hi @BarryFletcher ,
The reason for this problem is generally because, you are using recursion in your query (i.e. a function that calls itself appears).
When you had a small amount of data before, you were able to use recursion to calculate Power Query, so you were able to run it before. However, as the amount of data you are updating increases, the number of queries Power Query needs to process will increase exponentially until it reaches its processing limit, and then the error will occur.
The general solution is to Group by the data first, and then recurse on the data in each Group, so that the amount of data that needs to be processed for each recursion will be much smaller. Or you can go back to the data source and implement recursion in the data source, because the processing power of the data source will be much stronger than Power Query.
Also I found this blog that might be helpful:
Understanding the "Evaluation resulted in a stack overflow" error in Power Query in Excel and Power ...
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.
Hi, @BarryFletcher If you have appened queries, you can follow this earlier post
https://community.fabric.microsoft.com/t5/Desktop/Expression-Error-Evaluation-resulted-in-a-stack-ov...
If your problem still exist, then enable trace in diagnostic from the option in power bi and refresh report again to capture log. Follow this steps, mentioned here
https://superuser.com/questions/1193926/stack-overflow-error-importing-data-to-microsoft-power-bi-ev...
If you have used recursive function in your queries, then try to avoid it. Also, you can check each step where this error appeared.
Hope this helps!!
If this solved your problem, please mark it as a solution.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
78 | |
78 | |
59 | |
35 | |
33 |
User | Count |
---|---|
100 | |
62 | |
56 | |
47 | |
41 |