AccumulativeColumn
This example shows the usage of AccumulativeColumn process
date | spent |
2018-09-01 |
$142 |
2018-09-02 |
$90 |
2018-09-03 |
$123 |
2018-09-04 |
$164 |
2018-09-05 |
$423 |
2018-09-06 |
$343 |
->pipe(new AccumulativeColumn(array(
"running_total"=>"spent"
)))
date | spent | running_total |
2018-09-01 |
$142 |
$142 |
2018-09-02 |
$90 |
$232 |
2018-09-03 |
$123 |
$355 |
2018-09-04 |
$164 |
$519 |
2018-09-05 |
$423 |
$942 |
2018-09-06 |
$343 |
$1,285 |
The example demonstrates usage of `AccumulativeColumn` process. The AccumulativeColumn creates new column from existed column and generate running total for that existed column. You can see in above example, `spent` is what we spent on a day and new `running_total` is the toal money we have spent until that day.