Ayagikei / LifeUp

Pure and highly customizable gamified to-do and habit-forming app.
209 stars 4 forks source link

[Bug] Calculation of average values in new statistics page is not correct #100

Closed LordElamak closed 10 months ago

LordElamak commented 1 year ago

I've noticed that the average values in the statistics page are not correct. For the average values of a week, the total value is always divided by 6 instead of 7. I've also noticed this in September month statistics where the total values are divided by 29 isntead of 30. Strangely the averages in October seems to be correct (total divided by 31).

In general, the calculation of the daily average values should be as follows: average value = total value / (period end date - period start date +1)

Please can you check the calculation.

Furthermore I would expect that the average values of current periods (current week, month or year) will be calculated as "to date" values (divided by the number of days that passed from start of period till today). Currently these average values are calculated over the complete period, which results in low and meaningless values in my opinion, especially for the current year.

Ayagikei commented 1 year ago

Hello, thanks for your feedback!

We'll take a look asap.

Ayagikei commented 1 year ago

We fixed the average calculation issue in v1.93.0-rc02.

But we haven't modified the "to date" values yet. This is a nice suggestion and we will continue to improve it in future versions.

Ayagikei commented 11 months ago

Furthermore I would expect that the average values of current periods (current week, month or year) will be calculated as "to date" values (divided by the number of days that passed from start of period till today). Currently these average values are calculated over the complete period, which results in low and meaningless values in my opinion, especially for the current year.

These changes will be released in v1.93.4, which we expect to release in the next week or two.

Ayagikei commented 10 months ago

It should have been fixed in version 1.93.4.