transformations:pivot
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| transformations:pivot [2016/06/19 20:01] – 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 | + | \\ |
| + | =====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). | ||
| + | |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. | ||
| + | |||
| + | \\ | ||
| + | =====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===== | ||
| + | |||
| + | ====Example #1==== | ||
| + | > | ||
| + | |||
| + | ===Before (source table)=== | ||
| ^ Country | ^ Country | ||
| - | | Canada | + | | Canada |
| - | | United States | + | | Norway |
| - | | Norway | + | | Germany |
| - | | Germany | + | | Canada |
| - | | Canada | + | | Norway |
| - | | United States | + | | Germany |
| - | | Norway | + | |
| - | | Germany | + | |
| + | ===After (result table)=== | ||
| + | ^ Country | ||
| + | | **Canada** | ||
| + | | **Norway** | ||
| + | | **Germany** | ||
| - | **Transformation:** Pivot on columns [Season] and [Medals]. Aggregation | + | ===Action parameters=== |
| + | > Column labels: Season | ||
| + | > Data: Medals | ||
| + | > Aggregation | ||
| - | **Result:** | + | \\ |
| - | ^ Country | + | =====Community examples===== |
| - | | Canada | + | |
| - | | United States | + | |
| - | | Norway | + | |
| - | | Germany | + | |
| + | * [[https:// | ||
| - | **See also** | + | \\ |
| + | =====See also===== | ||
| * [[transformations: | * [[transformations: | ||
transformations/pivot.1466380899.txt.gz · Last modified: by dmitry