Averageif should skip missing value


Version: 2021b

Type: Bug Fixes

Category: Programming

Subcategory:

Jira: ORG-22847


See

newbook;
wks.nCols = 4;
col(A) = data(1,5); col(A) = 1;
col(B) = data(1,5); col(B)[3] = 0/0;
csetvalue col:=col(C) formula:="Mean(B)";
csetvalue col:=col(D) formula:="Averageif(B, "A==1")";

==> Result in column D is 2.4, but it should be 3 like column C.

Fixed in Origin 2021b.