Unpivot Node

The Unpivot Node allows you to rotate columns into rows. In other words, by unpivoting your table you will rotate values from multiple unique columns into a single column with category values and a supporting columns which summarize the data for each unique row from the new unpivot column.

For instance, you can use the Unpivot node on a table that looks like the following and restructure its data and granularity, summarizing the data in a more "vertical" way:

Now we get at a table that looks like the following, in which the columns for each of the different shops become a single column called "shop" and its unique values are the shop names - the names of the previously existing columns:

Note: In order to use the Model feature you already should have already imported data sources into Y42.

Setting up your Unpivot Node

  • Click on the Unpivot Node to apply the settings.

  • Continue by writing on Target Column the name of the new column you will create combining the columns rotated into rows.
  • Then choose the name for the Unpivot Columns, the metric or value that will be aggregated to each newly created row.
  • On Group Value, if you have more than one unpivot column, you can flag them apart by giving each group a different name.
  • Select now on Group Columns the columns that will fall into the Target Column as rows.

To illustrate better these node settings, take the following setup as an example - used to achieve the use case in the beginning of this article:

Once you're done with this transformation, you can either perform further transformations or, if you want to export the new data table, click Commit Model.