I have the following table and want the average and the count of each column. Unfortunately the group process takes the empty fields (empty and null) into account and gives me the wrong result.
E.g. the first column has a sum=16 and a number-count=5, so it should be 16/5=3,2 but the result ist 2,6666.
My goal is to have the following data "average of only the answered fields", "count of answered (not empty) fields", "count of not answered (empty) fields"
$survey_data_group_2
->pipe(new Filter(array(
array("lastpage","=","5")
)))
->pipe(new Transpose2())
->pipe(new Filter(array(
array("c0","endWith","a")
)))
->pipe(new Transpose2())
->pipe(new RemoveColumn(array(
"c0"
)))
->pipe(new Group(array(
"avg"=>$columnNames,
)))
->pipe($this->dataStore('data3'));
Is it possible to define the grouping process? Or what would be an alternative solution?