Table of Contents
Category: Transform / Advanced
Creates a matrix table from a straight table using values in one column as the column labels, and values in a second column as the matrix columns' values. This action is opposite to Unpivot.
This action is used to make aggregated, cross-tabular tables from data lists.
This action functions similarly to Excel's PivotTable feature.
|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). Select an aggregation method to apply to the values. Options: Sum,
Count, Min, Max, Any, and Average.
|Preserve formatting||Select this option when a column of date/time values will be used for column headers to retain the date/time format.|
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 "Country" column was used for implicit grouping because the two other columns, "Season" and "Medals", were used for the labels and data, respectively.
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.
Example: Summarize the data below in a matrix table showing the number of medals won by Country (rows) and Season (columns).
Source table: Winter Olympics medals
|United States||winter 2010||37|
|United States||winter 2014||28|
Column labels using the "Season" column
Data from the "Medals" column
Aggregation method = "Any"
|Country||winter 2010||winter 2014|
- How to order columns by a list of columns (Project; Module: Main; Group: Tab 1; Table: Reordered columns; Action position: 3)
- Transpose with grouping (Project; Module: Main; Group: Tab 1; Table: Book1.xlsx; Action position: 5)
- Sort column in an export alphabetically (tab) (Project; Module: Main; Group: Enum/pivot/append; Table: Template table to append to; Action position: 3)
- Example: obtaining stock price history from web API (Project; Module: Main; Group: Group 1; Table: Stock history; Action position: 8)
- Collapsing multiple rows into one (Project; Module: Main; Group: Group 1; Table: Method 1; Action position: 4)