Hi Please help me I am using calculated column with pivot 2D plus and minus working in calculate column process but when I use division or multiplication of two column is not work and when i enter custom value for division like 2 its working please check .
$node = $this->src("mysql")->query($Query)
->pipe(new CalculatedColumn(array(
"JSWithRating"=>"{oneStar}+{twoStar}+{threeStar}+{fourStar}+{fiveStar}"
)))
->pipe(new CalculatedColumn(array(
"Average"=>function($row){
return $row["quantity_c"]/$row["JSWithRatings"];
}
)))
->pipe(new Pivot2D(array(
"dimensions"=>array(
"column" => "dateyear",
"row" => "users_zone_c, address_state, CSCName, engname",
),
"aggregates"=>array(
"sum" => "quantity_c, JSWithRating, noRating,Average, oneStar, twoStar, threeStar, fourStar, fiveStar",
),
)))
->pipe($this->dataStore('tat1Field'));
"measures"=>array(
"quantity_c - sum",
"JSWithRating - sum",
"noRating - sum",
"Average - sum",
"oneStar - sum",
"twoStar - sum",
"threeStar - sum",
"fourStar - sum",
"fiveStar - sum",
),
please tell me where I wrong ?