Bug 107267 - During a sub-total calculation or sum, the data set is not computed well.
Summary: During a sub-total calculation or sum, the data set is not computed well.
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Jean-Sebastien Bevilacqua
URL:
Whiteboard: target:6.0.0 target:6.1.0 target:6.0....
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-19 10:46 UTC by Naeil ZOUEIDI
Modified: 2021-02-23 15:25 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
The spreadsheet to reproduce the bug. (14.68 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-04-19 10:53 UTC, Naeil ZOUEIDI
Details
Sample file with subtotals applied. (16.16 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-04-19 15:05 UTC, m_a_riosv
Details
Screenshot (84.01 KB, image/png)
2017-04-24 08:25 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Naeil ZOUEIDI 2017-04-19 10:46:35 UTC
Description:
Working on a spreadsheet with Libreoffice Calc. After, I wanted to calculate the  max, min and average it doesn't show in the end no lines indicates the max, average and min of the set of values.

On the other hand, it shows only the field/label total in the end of the spreadsheet file and affected the Max value to it.

I will attach the file I work on, so the steps mentioned below to reproduce the same behavior as I have; containing the names of cells existing already in my spreadsheet not the default ones.

Steps to Reproduce:
1. Select cell A1 
2. Click in the menu "Data" -> "Subtotals"
= 1st group =
3. Group by "Person Number", select "shipping time" and use the Max function.
= 2nd group =
4.
5. Group by "Person Number", select "shipping time" and use the Min function.
= 3rd group =
6. Group by "Person Number", select "shipping time" and use the Average function.
7. Then OK.

Actual Results:  
The fields max, min and average specified for the set of values does not exist.
There is only "Total" which have the value of Max function.

Expected Results:
Showing the cells in the end of spreadsheet Max,Min and Average to all the set of values and calculate well the value of total.


Reproducible: Always

User Profile Reset: Yes

Additional Info:
Tested on: Archlinux, Ubuntu and Windows.
Version: 5.3.0.3 release.


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0
Comment 1 Naeil ZOUEIDI 2017-04-19 10:53:14 UTC
Created attachment 132682 [details]
The spreadsheet to reproduce the bug.
Comment 2 m_a_riosv 2017-04-19 15:05:31 UTC
Created attachment 132689 [details]
Sample file with subtotals applied.

Works for me, find attached your file with subtotals.
Version: 5.3.2.2 (x64)
Build ID: 6cd4f1ef626f15116896b1d8e1398b56da0d0ee1
CPU Threads: 4; OS Version: Windows 6.19; UI Render: GL; Layout Engine: new; 
Locale: es-ES (es_ES); Calc: group
Comment 3 Naeil ZOUEIDI 2017-04-24 08:18:42 UTC
(In reply to m.a.riosv from comment #2)
> Created attachment 132689 [details]
> Sample file with subtotals applied.
> 
> Works for me, find attached your file with subtotals.
> Version: 5.3.2.2 (x64)
> Build ID: 6cd4f1ef626f15116896b1d8e1398b56da0d0ee1
> CPU Threads: 4; OS Version: Windows 6.19; UI Render: GL; Layout Engine: new; 
> Locale: es-ES (es_ES); Calc: group

Hello m.a.riosv thanks for your help and quick reply. 
What do you mean by "works for me", did you mean that you managed to reproduce the bug or it works properly as expected? cause as far as I can see from your attachment that you have the same behavior/bug.

Thanks,
nzoueidi
Comment 4 m_a_riosv 2017-04-24 08:25:34 UTC
Created attachment 132775 [details]
Screenshot

See attached what I see.
Comment 5 Eike Rathke 2017-07-27 08:43:48 UTC
The problem is in the final grand calculation at the end of the table. The "Grand Total" shown is calculated as SUBTOTAL(4,...) so being "Grand Max" instead (the 1st group's calculation function).

Bug submitter wants a) Grand values calculated for all groups (ie. Max, Min, and Average), and b) correct labelling, ie. "Grand Max" instead of "Grand Total" if for Max function.
Comment 6 Jonathan MERCIER 2017-07-27 09:01:52 UTC
Dear,

I have a patch wich will come soon
Comment 7 Eike Rathke 2017-09-08 21:13:22 UTC
Reassigning to realitix who's working on this https://gerrit.libreoffice.org/42042
Comment 8 Commit Notification 2017-09-13 17:03:45 UTC
Jean-Sebastien Bevilacqua committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e8d370e84af5dc9b8817cbf5aa66e50db150a0c6

tdf#107267: Fix grand total calculation

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Xisco Faulí 2017-10-13 22:05:27 UTC
A polite ping to Jean-Sebastien Bevilacqua: is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Thanks
Comment 10 Xavier Van Wijmeersch 2017-10-14 11:53:43 UTC
As in the explaining in comment 5; i think the problem is solved.
Tested with attachment 132682 [details]

Version: 5.4.2.2.0+
Build ID: SlackBuild for 5.4.2 by Eric Hameleers
CPU threads: 8; OS: Linux 4.9; UI render: default; VCL: kde4; 
Locale: nl-BE (en_US.UTF-8); Calc: group

Version: 6.0.0.0.alpha0+
Build ID: fbfe55e58c4b14f86cbb2c7b822f727e5b2e4a66
CPU threads: 8; OS: Linux 4.9; UI render: default; VCL: kde4; 
Locale: nl-BE (en_US.UTF-8); Calc: group
Comment 11 Jean-Sebastien Bevilacqua 2017-10-16 09:29:28 UTC
Indeed it's solved now.
Comment 12 Michael Meeks 2018-01-16 11:02:43 UTC
This caused a regression tdf#114720.
Comment 13 Commit Notification 2018-04-16 14:06:37 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f50e370db8f7ae20b12e312ad89a0f9961b7ee7a

Resolves: tdf#116003 check presence of subtotal in group, tdf#107267 follow-up

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Commit Notification 2018-04-17 10:20:02 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4b48a0b49de597fc9e9abb012fb31b6fedfee85b&h=libreoffice-6-0

Resolves: tdf#116003 check presence of subtotal in group, tdf#107267 follow-up

It will be available in 6.0.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2018-08-05 09:00:25 UTC
Zdeněk Crhonek committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f8046f991587aa569866d82d98b626c94badc400

uitest for bug tdf#107267

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 raal 2019-12-07 18:52:24 UTC
The test exist, set status to Verified.