Purpose
Creates a row for each original field and a column for each original row. Unlike Unpivot, it fully rotates the table structure and is suitable for compact matrices.
Inputs and outputs
One in input and out output. The result’s first field contains the original field names; subsequent columns correspond to the original rows.
Parameters
| Parameter | Settings and values | Options and limits |
|---|---|---|
header_column | The column whose values become the new headings. An empty value uses automatic names. | Default: emptyUp to 256 characters |
field_column | The name of the result’s first column; Field by default. | Default: FieldUp to 256 characters |
prefix | The prefix for automatic names; Row_ by default. | Default: Row_Up to 128 characters |
Step-by-step configuration
- Select the column containing future column headings or leave automatic mode enabled.
- Name the first field and set the prefix.
- Check that the new headings are unique and non-empty.
- Review the matrix size before subsequent writing.
Rules and diagnostics
- header_column supplies headings and does not create a separate row of values.
- NULL in header_column receives an automatic name; duplicate or invalid headings stop the result from being produced.
- The original row count becomes the width: the 16384-column limit and overall cell limit apply.
- Large “long” tables are usually better handled through grouping/Unpivot, because transposition makes them too wide.
Configuration example
Input: Metric, Jan, Feb with Revenue/100/120 and Cost/60/70 rows. Set header_column=Metric, field_column=Month. Output: Month, Revenue, Cost with Jan/100/60 and Feb/120/70 rows.