Forum Discussion
CrankyPants2382
Jul 25, 2023Copper Contributor
Return Date based on a sum of the total so far
Is there a formula that I could use that would return the date from a dataset based on a total so far for other conditions. A bit like a lookup but takes the sum so far into account. That's proba...
PeterBartholomew1
Jul 27, 2023Silver Contributor
An alternative solution using XLOOKUP rather than FILTER.
DatePickedλ(condition, threshold)
= LET(
Accumulateλ, LAMBDA(z, SCAN(0, z, LAMBDA(a, v, a + v))),
total, Accumulateλ(IF(weather = condition, apples)),
XLOOKUP(threshold, total, date, , 1)
)