Thread: Running Average
View Single Post
 
Old 02-07-2019, 12:32 AM
ArviLaanemets ArviLaanemets is offline Windows 8 Office 2016
Expert
 
Join Date: May 2017
Posts: 949
ArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant future
Default

Do you have a column with some numeric values, and another column with yes/no? And you want an average of numeric values with "yes" in another column 'until' current record?

The problem is, how do you define this 'until'! When it is simply position of entry in table, then any sorting you are making will recalculate this average, and it will be different compared with average the same entry did have before.

When you have a column with dates (without hours) in your table, you can base your running average on those dates. But there is no way to decide which entry was earlier for cases with several entries in same date - you will have same running average for all entries with 'yes' on this date.

The best case will be, when you have some unique ordered identifier in your table, like entry registering date and time, or entry number - entered manually or through VBA code. Then you can calculate a real running average for every entry - and this will remain same unless you enter forcibly some earlier entry.
Reply With Quote