Forum Discussion
Hogstad_Raadgivning
Feb 15, 2023Iron Contributor
Reset the Scan function with a condition.
Hi, I am playing with the Scan function. The goal is to "reset" sum at rolling months, of my choice. The problem is in this function: =SCAN(0;t_salg[Beløp];LAMBDA(a;b;IF(K3#<>M2;a+b;0*a+b))) ...
- Feb 15, 2023
Perhaps this:
=SCAN(0,t_salg[Beløp],LAMBDA(a,v,LET(k,SEQUENCE(ROWS(t_salg)/3,,3,3),IF(XOR(ROW(v)=k),v,a+v))))
Patrick2788
Feb 15, 2023Silver Contributor
Perhaps this:
=SCAN(0,t_salg[Beløp],LAMBDA(a,v,LET(k,SEQUENCE(ROWS(t_salg)/3,,3,3),IF(XOR(ROW(v)=k),v,a+v))))
- Hogstad_RaadgivningFeb 15, 2023Iron ContributorPerfect. Thank you.
- Patrick2788Feb 15, 2023Silver ContributorYou're welcome!