Dear all,
I need to SUM all the aggregated MAX values of 2 colums (BestandHaendler_aktuell AND BestandZentrale_aktuell) as a TOTAL line. But however I get only MAX value in the TOTAL line!! How can I implement this?
My setup:
->pipe(new Pivot(array(
"dimensions" => array(
"column" => "",
//"row" => "WerbegruppeVerbund, NikonKdName, NikonOrt, NikonProdGruppe, NikonArtBez"
"row" => "WerbegruppeVerbund, NikonKdName, NikonArtBez, NikonOrt"
),
"aggregates" => array(
"max" => "BestandHaendler_aktuell, BestandZentrale_aktuell",
//"sum" => "BestandHaendler_aktuell, BestandZentrale_aktuell"
)
)))
->pipe($this->dataStore('Reporting.autorep_v_Bestaende'));
My view:
<?php
PivotTable::create(array(
"dataStore"=>$this->dataStore('Reporting.autorep_v_Bestaende'),
"measures" => array(
"BestandHaendler_aktuell - max",
"BestandZentrale_aktuell - max",
),
"headerMap" => array(
"BestandHaendler_aktuell - max" => "(Stand gestern): Bestand-Händler",
"BestandZentrale_aktuell - max" => "Bestand-Zentrale",
),
"rowCollapseLevels" => array(0,1,2), //0 = zu, 1 = auf
"columnCollapseLevels" => array(1,2),
"totalName" => '<div align="right"><strong>TOTAL</strong></div>'
));
?>
The TOTAL result should be in the example below 8 instead of 4 (this is max of all results):
Any hint?