Qlik Community

QlikView Documents

Documents for QlikView related information.


Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Pivot Column operator example

Not applicable

Pivot Column operator example

The source table has the columns


The target table has the columns


The source table has two possible values for CostType - when CostType = 1, then the Cost value refers to the AverageCost and when CostType = 2, then the Cost value refers to the ReplenismentCost. So, for every Product there are two rows in the source table and only one row in the target table.

Here's how to use the Pivot Column operator to populate the target table from the source table:

  1. On the build output tab - you need 3 output attributes (ProductCode, AverageCost, ReplenishmentCost). The input attributes (ProductCode, CostType and Cost) should be automatically derived from the connection to the ReadTable.
  2. On the specify transfer tab - select to transfer the input attribute ProductCode to the output attribute for ProductCode
  3. On the specify pivots tab - add a pivot. Pivot from: CostType, Value from: Cost. Select the output attributes AverageCost and ReplenishmentCost
  4. On the edit output tab - in the "Input - Many Records" section, under the CostType column in the table, replace the AverageCost with 1 and the ReplenishmentCost with 2

Note that Expressor is case sensitive - mismatch in case when specifying attribute names will yield wrong results!

Version history
Revision #:
1 of 1
Last update:
‎08-08-2012 04:20 PM
Updated by: