For example i have tried the code below but it doesn't work.
class myPivot extends PivotTable
{
protected function process()
{
return [
,,,
"computations" => array(
"yearlyDifference" => "{2023-10} - {2023-09}",
"monthlyDifference" => function($aggRow) {
return ($aggRow['2023 -||- 11 -||- Amount - sum'] ) - ($aggRow['2023-10 -||- Amount - sum'] ?? 0);
},
....
I also tried this code without success:
protected function display()
{
return [
...
'map' => array(
"{value}" => function($row) {
$row["2023 -||- 11 -||- percentage change"] =
100 * $row["2023 -||- 11 -||- Amount - sum"] / $row["2023 -||- 10 -||- Amount - sum"];
return $row;
}