Dear support, I am trying to name the aggregate columns in pivot table, but can`t find solution, can you please help?
This is my setup: $this->src('deptdata')
->query($sql)
->params($params)
->pipe(new ColumnMeta(array(
"init_balance" => array(
'label' => 'Balance',
'type' => 'float',
),
"income" => array(
'label' => 'Income',
'type' => 'float',
),
)))
->pipe(new Pivot(array(
"dimensions" => array(
"column" => "",
"row" => "client, currency, agreement_type, agreement, date",
),
"aggregates" => array(
"sum" => "init_balance, income, outcome, final_balance",
),
)))
->pipe($this->dataStore('deptreport'));
This is my view: PivotTable::create(array(
"dataStore"=>$this->dataStore('deptreport'),
'headerMap' => array(
'init_balance - sum' => 'Initial Ballance',
'income - sum' => 'Income',
'outcome - sum' => 'Outcome',
'final_balance - sum' => 'Final Ballance',
),
));
Where can I add names for aggregate columns ('Initial Balance', 'Income', 'Outcome', 'Final Balance'?