Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys.
I have Data which comes in in the form of a CSV file . It is structured As [ Key, Attribute, Value]. I want to pivot the Data and have the questions as headers.
I am still very new to Qlikview so I have tried to use the Generic Load and it has created multiple Tables and I am not sure how to join the Tables to make one table as the Attribute section has got over hundred different questions which has resulted in Hundreds of tables which looks clumsy and hard to work with.
Requirements:
Citizen Code | Question | Response |
ZZZ1222 | D.O.B | 23/12/1979 |
ZZZ1222 | Ave Income | $560 |
ZZZ1222 | Employment Status | Part Time |
ZZZ1222 | Education Level | High School |
ZZZ1222 | Family Size | 4 |
ZZZ1223 | D.O.B | 23/12/1969 |
ZZZ1223 | Ave Income | $100 |
ZZZ1223 | Employment Status | Retired |
ZZZ1223 | Education Level | Primary |
ZZZ1223 | Family Size | 8 |
I have encountered another challenge. My Transactional date string is picking a time stamp and I would like to strip the time from the Date As I only want to use the Date. Should I do it after the generic Load or before and How best can I do it?
With date(floor(YourDateField)) you could cut the time-part respectively with time(frac(YourDateField)) the date-part and I think it will be more suitable to do it after the generic-statement within your final table.
- Marcus
Thank you so much.
Hi Marcus.
Is it possible to rename columns in the Generic Load Script. for Example changing Retailer to StoreType in the example.
I think yes but I'm not sure if it's a good idea to rename fields within the generic statement or the following join-loop. I believe it would be better to do this before or after the transforming, maybe a mapping-approach is here useful: How to Rename Fields.
- Marcus
thank you so much.