User Tools

Site Tools


transformations:subtotal

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

transformations:subtotal [2018/07/22 20:00] (current)
dmitry created
Line 1: Line 1:
 +===== 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:​aggregate|Aggregate]]
transformations/subtotal.txt · Last modified: 2018/07/22 20:00 by dmitry