Forum Discussion
Viz
Nov 18, 2022Brass Contributor
ByRow function produces two different results depending on whether row is range or array
In a nutshell, I am trying to compute average with a combination of ByRow, Index, and Average. I needed a sequence number array for this algorithm. When I put this sequence number in a range and use ...
PeterBartholomew1
Nov 18, 2022Silver Contributor
AverageLast7λ
= LAMBDA(v, LAMBDA(a,
IF(a<7,"NA",
AVERAGE(TAKE(TAKE(v, a),-7))
)
));
also worked.
Viz
Nov 19, 2022Brass Contributor
Thanks, Peter. That definitely adds a degree of elegance to the formula.
I have been relying too much on Index for looping. I indeed need to do a bit of unlearning and should start working with Map and Take.
I have been relying too much on Index for looping. I indeed need to do a bit of unlearning and should start working with Map and Take.