transformations:subtotal
This is an old revision of the document!
Total / subtotals
This action appends to a dataset a new column that contains an aggregated total for selected column, or subtotals for groups.
Example 1
Source dataset:
| Region | Sales |
|---|---|
| North | 100 |
| East | 200 |
| North | 150 |
| East | 125 |
Objective: add a column with Total Sales.
Resulting dataset:
| Region | Sales | Total Sales |
|---|---|---|
| North | 100 | 575 |
| East | 200 | 575 |
| North | 150 | 575 |
| East | 125 | 575 |
Example 2
Source dataset:
| Region | Sales |
|---|---|
| North | 100 |
| East | 200 |
| North | 150 |
| East | 125 |
Objective: add a column with Total By Region.
Resulting dataset:
| Region | Sales | Total By Region |
|---|---|---|
| North | 100 | 250 |
| East | 200 | 325 |
| North | 150 | 250 |
| East | 125 | 325 |
See also
transformations/subtotal.1532289654.txt.gz · Last modified: by dmitry