Altair® Monarch®

 

Unpivoting Columns

Unpivoting allows you to turn a  short/wide table into a  tall/skinny one by distributing columns into rows.

Consider the example below:

 

We can unpivot the month columns (April, May, and June) so these become attributes of Sales Organization and are distributed as row values instead.

Unpivoting Columns

You can only unpivot columns from the Prepare Window.

Steps::

  1. In Prep Data, select the table you want to transform.

  2. Select Transform on the Monarch Data Prep Studio Toolbar.

A dialog box allows you to select a transformation.

  1. Select UnPivot to display the UnPivot dialog:

 

  1. Enter a pivot name.

By default the resulting table will be named Unpivot. If such a table already exists, the tables will be named Unpivot(1), and so forth. You can then rename the table as needed.

  1. Select the column(s) to unpivot. You can:

    • Select the  key icon beside the columns on the Attribute Columns panel, or

    • Select All Columns from the Options drop-down.

 

Columns you designate as unpivot columns are moved to the Unpivot Columns panel.

  1. Select the Attribute columns by clicking on the box beside a column on the Attribute Columns panel.

 

  1. Select OK.