Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
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:
CUSTOMER_ID | VARIABLE_1_LY_P1 | VARIABLE_1_LY_P2 | VARIABLE_1_LY_P3 | .... |
---|---|---|---|---|
124812941 | 12 | 52 | 32 | .... |
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:
CUSTOMER_ID | PERIOD | VARIABLE_1 | VARIABLE_2 | ... |
---|---|---|---|---|
124812941 | 31.01.2015 | 12 | 345 | ... |
124812941 | 31.02.2015 | 52 | 499 |
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!
Hi,
please post a data sample, so people here can help you better
I have attached a data sample to my original post