Bug 123075 - In CALC i cannot easily get a sum of the numbers in a numeric column when i am in a row filtered view
Summary: In CALC i cannot easily get a sum of the numbers in a numeric column when i a...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-30 23:05 UTC by William Signer
Modified: 2019-02-01 01:03 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description William Signer 2019-01-30 23:05:51 UTC
Description:
when I do a sum in a column cell below the filtered column  I get the sum of the filtered rows in the column plus the sum of the hidden cells in that column


to get the sum of the filtered column I can copy the filtered column cells and paste them into a column at a row line below the displayed filtered rows. Then I can do a sum in a cell below the new column rows.

Steps to Reproduce:
1.See description
2.
3.

Actual Results:
See description

Expected Results:
I should expect to be able to sum the cells in a filtered column in a cell below the displayed column.

find  sums on filtered data is something I have to do on many of my calc sheets.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Xisco Faulí 2019-01-30 23:45:32 UTC
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)

I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
Comment 2 Oliver Brinzing 2019-01-31 17:38:46 UTC
(In reply to William Signer from comment #0)
> when I do a sum in a column cell below the filtered column  I get the sum of
> the filtered rows in the column plus the sum of the hidden cells in that
> column

to get the sum of the filterd rows you have to use "=subtotal(9;cellrange)" instead of "=sum(cellrange)", e.g. =SUBTOTAL(9;C5:C8)

https://help.libreoffice.org/6.1/en-US/text/scalc/01/04060106.html?DbPAR=CALC#bm_id3165633
Comment 3 m_a_riosv 2019-02-01 01:03:57 UTC
As explained by Oliver there are functions designed to do it:

SUBTOTAL https://help.libreoffice.org/6.1/en-US/text/scalc/01/04060106.html?DbPAR=CALC#bm_id3165633

and the most complete
AGGREGATE https://help.libreoffice.org/6.1/en-US/text/scalc/01/func_aggregate.html?DbPAR=CALC#bm_id126123001625791

also the Menu - Data - Subtotals
file:///C:/Users/MARV/Downloads/LibreOffice%206.2.64/help/en-US/text/scalc/01/12050000.html?&DbPAR=CALC&System=WIN