Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
pranaview
Creator III
Creator III

How to dynamically adjust the filed name while loading data into Qlik

Hi everyone,

Problem:  My source table kinda looks like this with some dummy data 

SampleFile.PNG

Now when I load it into qlik, I get Nov,Dec,Jan as fields but when the file will be updated next month, it will have Dec,Jan and Feb which is not present in the original script and I obviously can't keep on changing the script every month. So, I was wondering if there's any way so that I can make a generic load script which can dynamically read the month columns and load into qlik. 

Any suggestion or help will be appreciated.

Thanks,

Pranav 

Labels (4)
2 Replies
chrismarlow
Specialist II
Specialist II

Hi Pranav,
You can use crosstable - https://help.qlik.com/en-US/qlikview/November2018/Subsystems/Client/Content/QV_QlikView/Scripting/Sc... - so something like CrossTable (date, value,4) before your load statement, but you should be able to use the import wizard to line it up.
You might also need to tidy up your months/dates & decide what to do with your target and rolling average field.
Cheers,
Chris.
pranaview
Creator III
Creator III
Author

Hi Chris,
Thanks for pitching in!
I did think about the CrossTable() function but it won't work as I would still need to know which months are present in the updated file when I will try to load the data before i can transpose them using CrossTable().

For now i think i will have to the transpose directly in source file along with some other modifications prior to the load.

Regards,
Pranav