UNPIVOT performs the opposite operation to PIVOT by rotating columns of a table-valued expression into column values.
Unpivot to (example)
Specifies the non-pivoted columns. Together with any Scope columns, these values from these columns make up the key for each row produced by the Unpivot function.
Specifies the configuration for creating rows of data from source columns.
Specifies the column to unpivot
Specifies the column to receive the value from the Unpivot function
The Scope extends the Columns collection by specifying additional columns that add to the row key of each row produced by the unpivot function. For example, suppose you are unpivoting a Data Store set up for periodic input for products to an Amount-Transdate format, and you want the produced rows to be keyed by the Transdate in addition to the ProductID, you would add the Transdate source column to the Scope collection of the unpivot configuration. Make sure that any Scope columns exist in the Transformation Result Columns collection to make them importable to the target Data Store.