GNOME Bugzilla – Bug 767290
DCOUNT & DCOUNTA: field argument
Last modified: 2016-06-10 19:13:44 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.
What does it mean to satisfy criteria if there is no field? Sample in xlsx or ods format?
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.
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.
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.
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
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.