The following formula was a result of help via this forum in February, [I have no experience of the LET process], & it works perfectly.
I need to modify the above so that it provides the average of the last 20 entries irrespective of the value, e.g. not the average of the 8 smallest from the last 20.
Code:
= LET(
arr, FILTER($BG$15:$BG$234,$BG$15:$BG$234 >0),
n, COUNT(arr),
k, SEQUENCE(1,20,n,-1),
d, INDEX(arr, k),
s, SMALL(d,{1,2,3,4,5,6,7,8}),
AVERAGE(s)
)