Forum Discussion
Recursive Lambda Filter Function
- JonFerryJun 06, 2023Copper Contributor
mtarler I was not able to get it to work, but I may not have applied it correctly. I have attached a simplified version of my spreadsheet, where I have taken out all other formulas other than the one in question, which can be found in the CPI tab.
I have simplified this a bit, as this is only calculating the Total Interest by year, and excludes the calculation of construction spending by year. But apart from that simplification, you'll see that this is the full formula that I mentioned in my original post as being very long. If you were to call the penultimate variable, which is "TotalInterest" you would see that it would spill into a single table. These values would be the interest accumulated by month for each project. However, the final line of the algorithm is the one where I am trying to sum up the TotalInterest by year, rather than by month, and this is where I could not get it to spill, because I could not feed a series of values into the filter function for the Current Year (e.g., filter for the first year in the array and print the results in the first column, and then filter for the second year in the array and print the results in the second column, etc.).