transformations:subtotal
Differences
This shows you the differences between two versions of the page.
Next revisionBoth sides next revision | |||
transformations:subtotal [2018/07/22 16:00] – created dmitry | transformations:subtotal [2021/05/05 10:47] – craigt | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Total / subtotals | + | {{ transformations: |
+ | ====== TOTAL/SUBTOTALS | ||
+ | Category: Transform / Math\\ | ||
- | This action appends to a dataset a new column that contains an aggregated total for selected column, or subtotals for groups. | + | \\ |
+ | =====Description===== | ||
+ | This action appends to a dataset a new column that contains an aggregated total for selected column, or subtotals for groups.\\ | ||
- | **Example 1** | + | \\ |
+ | =====Use cases===== | ||
+ | Create a " | ||
- | Source | + | |
+ | \\ | ||
+ | =====Action settings===== | ||
+ | ^Setting^Description^ | ||
+ | |New column|Enter a name for the new total/ | ||
+ | |Target column|Select the numeric column used to generate the aggregate values.| | ||
+ | |Mode|Select the aggregation mode. Options: | ||
+ | |Groups|Select whether to derive the total/ | ||
+ | \\ | ||
+ | =====Remarks===== | ||
+ | The new column will appear as the rightmost column in the dataset, by default. | ||
+ | |||
+ | The grouping aspect of the //Subtotal inside groups// option is case sensitive. | ||
+ | |||
+ | \\ | ||
+ | =====Examples===== | ||
+ | **Example 1:** Add a column with Total Sales.\\ | ||
+ | |||
+ | **Source table:** | ||
^ Region ^ Sales ^ | ^ Region ^ Sales ^ | ||
| North | 100 | | | North | 100 | | ||
Line 11: | Line 35: | ||
| North | 150 | | | North | 150 | | ||
| East | | East | ||
- | + | \\ | |
- | Objective: add a column | + | **Action parameters:** |
- | + | > New column | |
- | Resulting dataset: | + | > Target column is " |
+ | > Mode is " | ||
+ | > Groups is " | ||
+ | \\ | ||
+ | **Result:** | ||
^ Region ^ Sales ^ Total Sales ^ | ^ Region ^ Sales ^ Total Sales ^ | ||
| North | 100 | 575 | | | North | 100 | 575 | | ||
Line 21: | Line 49: | ||
| East | | East | ||
- | **Example 2** | + | \\ |
+ | \\ | ||
+ | **Example 2:** Add a column with Total By Region.\\ | ||
- | Source | + | **Source |
^ Region ^ Sales ^ | ^ Region ^ Sales ^ | ||
| North | 100 | | | North | 100 | | ||
Line 29: | Line 59: | ||
| North | 150 | | | North | 150 | | ||
| East | | East | ||
- | + | \\ | |
- | Objective: add a column | + | **Action parameters:** |
- | + | > New column | |
- | Resulting dataset: | + | > Target column is " |
+ | > Mode is " | ||
+ | > Groups is " | ||
+ | \\ | ||
+ | **Result:** | ||
^ Region ^ Sales ^ Total By Region ^ | ^ Region ^ Sales ^ Total By Region ^ | ||
| North | 100 | 250 | | | North | 100 | 250 | | ||
Line 39: | Line 73: | ||
| East | | East | ||
- | **See also** | ||
+ | \\ | ||
+ | =====See also===== | ||
* [[transformations: | * [[transformations: |
transformations/subtotal.txt · Last modified: 2022/10/02 20:15 by craigt