transformations:pivot
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
transformations:pivot [2020/01/22 04:38] – dmitry | transformations:pivot [2025/05/05 17:18] (current) – v5.9.5 updates 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: Winter Olympics medals** | + | \\ |
+ | =====Use cases===== | ||
+ | This action is used to make aggregated, cross-tabular tables from data lists. | ||
- | ^ Country | + | This action functions similarly to Excel' |
- | | Canada | + | |
- | | United States | + | |
- | | Norway | + | |
- | | Germany | + | |
- | | Canada | + | |
- | | United States | + | |
- | | Norway | + | |
- | | Germany | + | |
+ | \\ | ||
+ | =====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). | ||
+ | |Aggregate |Check on to aggregate the values in the selected Data column, and choose an aggregation method. \\ Options: //Sum//, //Count//, //Count distinct//, //Min//, //Max//, //Any//, or // | ||
+ | |Preserve formatting|Select this option when a column of date/time values will be used for column headers to retain the date/time format. | ||
+ | |Column order|Choose whether the resultant columns retain their order or are sorted. | ||
- | Pivot on columns | + | \\ |
+ | =====Remarks===== | ||
+ | Note that grouping works implicitly in the //Pivot// action. Groups are formed by the combination of values in other columns | ||
+ | |||
+ | 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===== | ||
+ | |||
+ | ====Example #1==== | ||
+ | > | ||
+ | |||
+ | ===Before (source table)=== | ||
+ | ^ Country | ||
+ | | Canada | ||
+ | | Norway | ||
+ | | Germany | ||
+ | | Canada | ||
+ | | Norway | ||
+ | | Germany | ||
- | Result: | + | ===After (result table)=== |
- | ^ Country | + | ^ Country |
- | | Canada | + | | **Canada** |
- | | United States | + | | **Norway** |
- | | Norway | + | | **Germany** |
- | | Germany | + | |
- | Note that grouping works implicitly in the " | + | ===Action parameters=== |
+ | > Column | ||
+ | > Data: Medals | ||
+ | > Aggregation method: Any | ||
- | If a pivoted dataset has only two columns, one of which is used for data, and the other for labels), then the resulting dataset will always have only 1 row. | + | \\ |
+ | =====Community examples===== | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
- | **See also** | + | \\ |
+ | =====See also===== | ||
* [[transformations: | * [[transformations: |
transformations/pivot.1579685926.txt.gz · Last modified: 2020/01/22 04:38 by dmitry