Hi,
I want to make a table for each salesman with the sum of their sells and growth in the same table, and the targets % accomplished.
For now, I Know how to make the sum and % for one element :
->pipe(new Group(array(
"sum"=>"sells",
"by"=> "Date",
)))
->pipe(new CopyColumn(array(
"indicator"=>"sells",
'decimals'=>1,
)))
An in my view :
Table::create(array(
"dataStore"=>$this->dataStore('marge_delta_rec'),
"columns"=>array(
"Date"=>array(
"label"=>"Date"
),
"sells"=>array(
"label"=>"Marge Delta Rec"
),
"indicator"=>array(
"label"=>"Objectif",
"formatValue"=>function($value){
return ($value/ 600) * 100 ."%";
},
)
),
));
This seems to work fine but how can I have another column with the sum of the grotwh and a last column with the % accomplished ? If I'm not clear, here is a projection :