- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2025
06:47 PM
Hi @Dicken
This is not the correct way to calculate the average
avg = ( [avg ] + alist {x -1} ) / x
[avg] already contains the average of the previous x-1 values, not the sum of those values.
You can't just add the next value to [avg] then divide by x
The correct average calculation is either
avg = ([asum] + alist{x-1}) / x
or
avg = asum / x
Regards
Phil
Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.
Blog :: YouTube Channel :: Connect on Linkedin
Proud to be a Super User!
1,650 Views