Skip to main content
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Combination of unpivot and pivot


I'm new to Qlik Sense and hope you can help on the way with my first data import.

I have a very wide table, with one row per customer, and one column per variable and period. The data looks something like this:


For each variable, there's 24 columns, one for each month of this year (TY) and last year (LY). With ~30 variables, that's more than 700 columns. The table has ~200k rows.

I want to transform the data to have on column per variable, and one row per period (so 24 rows per customer instead of one). The end result would be something like this:


So from what I understand I would have to first do a unpivot (cross table), "split" the variable column to create a period column, and then do a pivot (generic) again to get the variables as columns.

Is this a sensible approach? How should I set up my load script?

Thank you!

2 Replies
Champion III
Champion III


please post a data sample, so people here can help you better

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable

I have attached a data sample to my original post