EXCEL Unpivot columns function

The EXCEL Unpivot columns function in RPA.

Help CentreBuilding Processes

This article describes the RPA Excel functionality to unpivot (melt) columns from wide to long format.

For a full list of available functions, please read EXCEL functions.


Description

The Unpivot columns function converts wide-format data into long format (also known as melt or unpivot). You specify which columns to keep as identifiers – all remaining columns are "melted" into two new columns: one for the original column name (Variable) and one for the cell value (Value). The result is written to a new sheet.


Example

With ID columns: "Product"

Before (wide format)
ProductJanFebMar
Widget100150200
Gadget8090110

After (long format)
ProductVariableValue
WidgetJan100
WidgetFeb150
WidgetMar200
GadgetJan80
GadgetFeb90
GadgetMar110

Setting it up

To use the Unpivot columns function, follow these instructions:

{{popups:rpas/add:action=excel-unpivot}}

Once on a process map:

  1. Navigate to the process where you would like to add the function
  2. Click on the green button’s drop-down
  3. Click on “+ Activity”
  4. Select the EXCEL Unpivot columns option
  5. Click "Add" once you are done

Input parameters

ParameterRequiredTypeDefaultDescription
ID columnsYesTextarea-The columns to keep as identifiers (one per line). All other columns will be unpivoted.
Variable column nameNoTextVariableName for the new column containing the original column headers
Value column nameNoTextValueName for the new column containing the cell values
Destination sheetNoText(auto)Name of the new sheet for the unpivoted data

Output

This function creates a new sheet with the unpivoted data. The original sheet is not modified.


Tips

  • This is the reverse of a pivot table – use it to normalise data for databases or reporting tools
  • List all columns that should stay as-is (identifiers) in the ID columns field – everything else gets melted
  • Common use case: converting monthly columns (Jan, Feb, Mar…) into rows with a Month column

Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.