Bug 31220 - Problem to modify functions in subtotals
Summary: Problem to modify functions in subtotals
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Kohei Yoshida
URL:
Whiteboard: target:3.4
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-29 10:07 UTC by Gustavo Pacheco
Modified: 2011-12-19 04:46 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Subtotals problem - modify function (9.46 KB, application/vnd.oasis.opendocument.spreadsheet)
2010-10-29 10:08 UTC, Gustavo Pacheco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo Pacheco 2010-10-29 10:07:46 UTC
Hi!

 1. Create a example spreadsheet like the file attachment;
 2. select cells;
 3. apply the subtotals (Data menu > Subtotals), choosing:
    Group by: Code 
    Calculate subtotals for: Price
    Use function: Average
 4. click OK.

  The subtotals will be apply to the cells. Then, after this, return to Data >
Subtotals to delete the subtotals:
 1. go to Data > Subtotals;
 2. click Delete

 The cells will be return to the original structure. Now, create a new subtotals
with a diferent function (Sum instead of Average).
 1. go to Data > Subtotals;
 2. apply the subtotals simply confirm standard options (without any click in the options):
    Group by: Code 
    Calculate subtotals for: Price
    Use function: Sum
 3. click OK.

 The subtotals will be apply. However, the function wich will be used is
Average, not Sum. It´s a bug or my mistake?

 Thanks!
Comment 1 Gustavo Pacheco 2010-10-29 10:08:42 UTC
Created attachment 39885 [details]
Subtotals problem - modify function
Comment 2 Kohei Yoshida 2011-01-21 07:20:43 UTC
Reproduced.  I'll take this.
Comment 3 Kohei Yoshida 2011-03-23 23:01:41 UTC
I looked into this, and turns out that the dialog is not entirely wrong.

When launching the dialog after removing the subtotal, it restores the previous selection and checks "Price" *but* the selection remains on "Code".  Since "Code" doesn't specify any function it defaults to the first function "Sum".  When you select "Price", the function selection becomes "Average" again.

I made changes so that when launching the dialog it selects the first checked item if one or more items are checked.  With this change, on the dialog shows "Average" function selected when launching it after removing the subtotal.  Hopefully that's less confusing for you.
Comment 4 Gustavo Pacheco 2011-04-15 08:44:31 UTC
  Hi Kohei!

  Your solution is fine! Thank you for your fantastic job in LibreOffice.