Forum Discussion
Insert previous rows with calculated columns
I got the error with the same data that I posted. The only difference is that my source is SQL server table with the same data that I have provided you. Yes, the error returned at the #"Group Rows" step. Please see the screenshot below for more info. Thanks.
As I wrote, I cannot see what you have done to adapt the code to your environment. Without that and without being able to reproduce the error, all I can do is suggest you recheck the code you have copied. My guess is that the error is coming from the custom function, and is due to a typo or mis-copy. Even that's hard to say since you did not show the status at the #"Grouped Rows" step in your screenshot.
PS I just tried again, this time using Power BI Desktop instead of Excel, and also obtained the results without errors.