Bug 479887 - Incorrekt average in Reports
Summary: Incorrekt average in Reports
Status: ASSIGNED
Alias: None
Product: skrooge
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: 25.1.0
Assignee: Stephane MANKOWSKI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-16 11:53 UTC by Fabiano Caruana
Modified: 2024-05-06 15:26 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
screenshot Report (26.12 KB, image/png)
2024-01-16 11:53 UTC, Fabiano Caruana
Details
My average in Libreoffice calc (23.54 KB, image/png)
2024-05-03 15:40 UTC, Fabiano Caruana
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabiano Caruana 2024-01-16 11:53:18 UTC
Created attachment 164943 [details]
screenshot Report

SOFTWARE/OS VERSIONS
Skrooge 2.31.0

Linux/KDE Plasma: opensuse Leap 15.5
(available in About System)
KDE Plasma Version:  5.27.9
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

Hi Stephane,

I've been "playing" with skrooge since last month. I have taken my data from KMyMoney. I had to correct some data, but now everything is OK and I'm currently using KMyMoney and Skrooge in parallel.
The bank import with Aqbanking also works. Once I have everything under control, I check all the functions again.

But what was immediately noticeable:
Reports calculate the average incorrectly. For example, for 3 months, the average is calculated as 4 months. The two partial months at the beginning and end are used as a full month.

Category 2023-10 2023-11 2023-12 2024-01 Total Average *** correct average (for 3 months)
Output -61.58€ -82.58€ -114.96€ -63.78€ -322.90€ -80.72€ -107.63
Total -61.58€ -82.58€ -114.96€ -63.78€ -322.90€ -80.72€ -107.63

Period: October 17, 2023 to January 16, 2024

(see attachment)

greetings
Udo
Comment 1 Stephane MANKOWSKI 2024-05-02 11:00:55 UTC
(In reply to Fabiano Caruana from comment #0)
> Category 2023-10 2023-11 2023-12 2024-01 Total Average *** correct average
> (for 3 months)
> Output -61.58€ -82.58€ -114.96€ -63.78€ -322.90€ -80.72€ -107.63
> Total -61.58€ -82.58€ -114.96€ -63.78€ -322.90€ -80.72€ -107.63
> 
> Period: October 17, 2023 to January 16, 2024
> greetings
> Udo
Hi,
This is the expected behavior.
Indeed, the average and the tendency curve are computed by using the values of the table.
Here 4 values, so average = (61.58€ +82.58€ +114.96€ +63.78€)/4 = 322.90/4 = 80.72.

I can understand that you would like to have 322.90/3 because you selected "Previous 3 months".
This seems (To be confirmed) to be possible for the average but I don't know how to do for the tendency curve.

Could you confirm that I well understood your request ?
Did you see how I can do for tendency curve ?

Regards,
Stéphane
Comment 2 Fabiano Caruana 2024-05-02 13:45:34 UTC
Hi Stephane,

I think ist not a great problem, ... I can calculate.
it would be nice to see the correct "3 months value"

Greetings
Udo
Comment 3 Stephane MANKOWSKI 2024-05-02 14:06:27 UTC
(In reply to Fabiano Caruana from comment #2)
> Hi Stephane,
> 
> I think ist not a great problem, ... I can calculate.
> it would be nice to see the correct "3 months value"
> 
> Greetings
> Udo

I don't understand. You already have the correct "3 months value".
If you want full months, you must use "Previous 3 months" instead of "Last 3 months".
Comment 4 Fabiano Caruana 2024-05-03 15:39:40 UTC
Hi Stephane,

I wrote a script to transfer it to LibreOffice Calc and calculate “my” average values.

Greetings
Udo

see attachment from today
Comment 5 Fabiano Caruana 2024-05-03 15:40:39 UTC
Created attachment 169149 [details]
My average in Libreoffice calc
Comment 6 Stephane MANKOWSKI 2024-05-06 15:26:19 UTC
Ok. Understood. I will try to do a fix.