After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 767290 - DCOUNT & DCOUNTA: field argument
DCOUNT & DCOUNTA: field argument
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Analytics
git master
Other Linux
: Normal enhancement
: ---
Assigned To: Morten Welinder
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2016-06-06 13:55 UTC by Andreas J. Guelzow
Modified: 2016-06-10 19:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
LibreOffice DCOUNT Sample file (8.24 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-06-07 17:30 UTC, Andreas J. Guelzow
Details

Description Andreas J. Guelzow 2016-06-06 13:55:58 UTC
In Libreoffice and supposedly Excel, the field argument of DCOUNT and DCOUNTA can be omitted in which case these functions return the count of all records that satisfy Criteria.

We should verify that Excel is doing that and implement this too.
Comment 1 Morten Welinder 2016-06-07 16:54:46 UTC
What does it mean to satisfy criteria if there is no field?

Sample in xlsx or ods format?
Comment 2 Andreas J. Guelzow 2016-06-07 17:30:07 UTC
Created attachment 329318 [details]
LibreOffice DCOUNT Sample file

The field is just the field to be counted. The criteria themselves include the field they relate to.
Comment 3 Andreas J. Guelzow 2016-06-07 17:40:17 UTC
More to the LO sample file, the following cell values are of interest:
E5: 2
E6: 1
E7: 2
In Gnumeric E7 is #NUM! instead since the field specification is missing.
Comment 4 Morten Welinder 2016-06-07 18:10:10 UTC
Excels works as LO.

Note: this is a case of a missing argument.  Supplying a argument that is a
cell with an empty value yields #VALUE! instead.
Comment 5 Morten Welinder 2016-06-09 18:35:56 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Once that release is available, you may want to check for a software upgrade provided by your Linux distribution.

I also fixed DCOUNT to ignore errors and DCOUNTA to count them.

I would feel better if we had a test for the database functions beyond the
trivial excel/dbfuns.xls
Comment 6 Morten Welinder 2016-06-10 19:13:44 UTC
A preliminary test file has been added.  I fixed some strictness issues.

We now pass all tests.  LO does pretty badly: DCOUNT and DCOUNTA are
strict when a field is given.  Others don't know that they should
ignore bools.