transformations:pivot
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
transformations:pivot [2016/06/19 20:01] – dmitry | transformations:pivot [2021/04/24 16:55] – craigt | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Pivot ===== | + | {{ transformations: |
+ | ====== | ||
+ | Category: Transform / Advanced\\ | ||
- | Creates a matrix table using values in one column as column labels, and values in another | + | \\ |
+ | =====Description===== | ||
+ | Creates a matrix | ||
- | EXAMPLE | + | \\ |
+ | =====Use cases===== | ||
+ | This action is used to make aggregated, cross-tabular tables from data lists. | ||
- | **Table:** Winter Olympics medals | + | This action functions similarly to Excel' |
+ | \\ | ||
+ | =====Action settings===== | ||
+ | ^Setting^Description^ | ||
+ | |Column labels|Select the column containing the values that will become the column labels of the matrix table (across the top).| | ||
+ | |Data|Select the column containing the values that will become the data in the body of the matrix table (at the\\ intersections of the rows and columns). | ||
+ | |Preserve formatting|Select this option when a column of date/time values will be used for column headers to retain the date/time format. | ||
+ | |||
+ | \\ | ||
+ | =====Remarks===== | ||
+ | Note that grouping works implicitly in the //Pivot// action. Groups are formed by the combination of values in other columns that are not labels or data. Values in a group are aggregated into one row. For instance, in the example below, the " | ||
+ | |||
+ | If a pivoted dataset has only two columns, one of which is used for data, and the other for labels, the resulting dataset will always have only one row. | ||
+ | |||
+ | To drill down to the cross-tabular results using specific dimensions, remove any columns not required in the matrix table prior to inserting the //Pivot// action.\\ | ||
+ | |||
+ | \\ | ||
+ | =====Examples===== | ||
+ | **Objective: | ||
+ | |||
+ | **Source table:** Winter Olympics medals | ||
^ Country | ^ Country | ||
| Canada | | Canada | ||
Line 16: | Line 42: | ||
| Norway | | Norway | ||
| Germany | | Germany | ||
- | + | \\ | |
- | + | **Action parameters:** | |
- | **Transformation:** Pivot on columns [Season] and [Medals]. Aggregation | + | > Column labels using the "Season" column |
+ | > Data from the "Medals" column | ||
+ | > Aggregation | ||
+ | \\ | ||
**Result:** | **Result:** | ||
^ Country | ^ Country | ||
Line 27: | Line 55: | ||
| Germany | | Germany | ||
- | **See also** | + | \\ |
+ | =====See also===== | ||
* [[transformations: | * [[transformations: |
transformations/pivot.txt · Last modified: 2021/07/19 02:23 by craigt