Bug 146790 - Problème avec la fonction NB.SI() COUNTIF()
Summary: Problème avec la fonction NB.SI() COUNTIF()
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Cell-Formula
  Show dependency treegraph
 
Reported: 2022-01-16 10:56 UTC by GDH
Modified: 2023-04-27 07:35 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
La fonction NB.SI() donne des résultats pas toujours correct (401.31 KB, application/pdf)
2022-01-16 10:56 UTC, GDH
Details
Illustration du bug document calc (21.05 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-01-16 17:10 UTC, GDH
Details
test file (10.45 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2022-01-23 20:58 UTC, raal
Details
Libre Office Clalc Bug NB.SI() (15.16 KB, application/vnd.oasis.opendocument.text)
2022-01-24 08:35 UTC, GDH
Details

Note You need to log in before you can comment on or make changes to this bug.
Description GDH 2022-01-16 10:56:09 UTC
Created attachment 177569 [details]
La fonction NB.SI() donne des résultats pas toujours correct

Voir le document en pièce jointe

Avec le même  jeux de données le résultat Libre Office diffère de celui d'Excel.

Ce n'est pas toujours le cas le bug est aléatoire.
Comment 1 m_a_riosv 2022-01-16 15:23:48 UTC
Please, language for this site is English.

And usually images are not good to test the problem like in this case.

Please can you attach a sample file.
Comment 2 GDH 2022-01-16 17:10:18 UTC
Created attachment 177583 [details]
Illustration du bug document calc
Comment 3 raal 2022-01-23 20:50:10 UTC
I can confirm with Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: bd5492275d31f59b1d269205018d1487af52426f
CPU threads: 4; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded Jumbo

but not with Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 4 raal 2022-01-23 20:58:06 UTC
Created attachment 177728 [details]
test file

test file created in excel with fixed values. The problem disappears after reload the file.
Comment 5 GDH 2022-01-24 08:35:56 UTC
Created attachment 177731 [details]
Libre Office Clalc Bug NB.SI()

New testing with the last version of Libre Office
The test result is unchanged
Comment 6 ady 2023-04-26 01:23:22 UTC
Repro in

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 5cd9de202765e243e41416802f3e4486b8a96f16
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (es_AR); UI: en-US
Calc: CL threaded
Built on 2023-04-21
Comment 7 Eike Rathke 2023-04-26 10:51:34 UTC
What actually is the problem? Loading (and recalculating) attachment 177728 [details] has the correct result 4.

Version: 7.5.4.0.0+ (X86_64) / LibreOffice Community
Build ID: 748c1400a4408ad875d72044bb635524cfeddf4d
CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: en-CA (en_CA.UTF-8); UI: en-US
Calc: threaded

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8a9936e2f8a30cc24279f4a749984f15bd2aaec8
CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: en-CA (en_CA.UTF-8); UI: en-US
Calc: threaded
Comment 8 ady 2023-04-26 12:11:46 UTC
(In reply to Eike Rathke from comment #7)
> What actually is the problem? 

STR:
1. Open attachment 177583 [details] from comment 2
2. [CTRL]+[SHIFT]+[F9] repeatedly until some numeric values in column D have their background color changed according to their conditional format.

Step 2 might take several tries, but it will happen eventually.

The BG color in column D shows repeating values, which in theory would only happen when there are repeating values in column A too, but it is clearly not always the case in attachment 177583 [details]. Thus, it would hint at some problem in COUNTIF().

I tried replicating the same situation with column A being integers (instead of [0...1], and it was clearly less likely to happen. So, is this because natural accuracy issues? IDK. (FWIW, bug 151958, also related to COUNTIF() doesn't seem to be related to accuracy.)
Comment 9 ady 2023-04-26 12:25:39 UTC Comment hidden (obsolete)
Comment 10 ady 2023-04-27 07:35:53 UTC
Still repro with:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9a555d79b3b00793edf1d51a8a7c76b723cc436d
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (es_AR); UI: en-US
Calc: CL threaded
Built: 2023-04-27