Bug 89994 - Wrong result of calculation for statistical function Mean in Writer tables
Summary: Wrong result of calculation for statistical function Mean in Writer tables
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Writer-Tables-Formulas
  Show dependency treegraph
Reported: 2015-03-13 16:21 UTC by kern_monika
Modified: 2019-01-16 13:43 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:

Example file (8.69 KB, application/odt)
2017-04-20 18:50 UTC, Telesto

Note You need to log in before you can comment on or make changes to this bug.
Description kern_monika 2015-03-13 16:21:59 UTC
the formula statistic - mean value in a table does not compute the correct value.
It computes sum(over x columns) / x columns
instead of dividing by the columns that have a value.


5 columns:
values: 2 empty 1 empty 3

the mean value should be (2+1+3)/3 = 2
LO writer computes (2+1+3)/5 = 1,2
Comment 1 A (Andy) 2015-03-13 18:27:10 UTC
Reproducible with LO, Win 8.1

On the other hand CALC computes it correctly = 2.
Comment 2 tommy27 2016-04-16 07:25:24 UTC Comment hidden (obsolete)
Comment 3 Telesto 2017-04-20 18:50:02 UTC
Confirming with:
CPU threads: 4; OS: Windows 6.19; UI render: GL; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-04-05_23:32:27
Locale: nl-NL (nl_NL); Calc: CL

and with:
Versie (Bouw-id: 7545bee9c2a0782548772a21bc84a9dcc583b89)
Comment 4 Telesto 2017-04-20 18:50:20 UTC
Created attachment 132723 [details]
Example file
Comment 5 QA Administrators 2018-04-21 02:33:55 UTC Comment hidden (obsolete)
Comment 6 Roman Kuznetsov 2019-01-16 13:43:54 UTC
still repro in

Build ID: 6b4ea2d8ddd681fec98773d7e0bbec9657a1fc08
CPU threads: 4; OS: Windows 6.1; UI render: default; VCL: win; 
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded