Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pivot table -during the load

Incoming data looks like below


































































VBELNMATNRBill.DateQTY
101XX11/3/201210
102XX11/5/20125
103YYY1/4/20125
104YYY1/6/201220
105XX12/2/201250
106XX12/28/20123
107YYY2/25/20122
108XX13/3/20129
109YYY3/3/201210
110XX13/19/2012

6

Expecting Results - during the time of the dataload (script)


















MATNRJan-12Feb-12Mar-12
XX1155319
YYY25210

We can do like this in the pivot table.The problem is -I have to  add additional few columns after Mar-12.

Pivot table will not work. Is there any better way to  handle  in the script.(Millions of record in the table).

Advance Thanks for your help.

1 Reply
Anonymous
Not applicable
Author

It will be:

data:
LOAD
   MATNR,
   date(monthstart("Bill.Date"), 'MMM-YY') as Month,
   sum(QTY) as QTY
FROM <your file>
GROUP BY MATNR, monthstart("Bill.Date");

Regards,
Michael
PS: it will be a little different if you load from a database, but the logic is the same.