Discussion Board for collaboration on QlikView Scripting.
Every day I received reports from partners with standard name "blabla_<PartnerName>_blabla_<date>.csv". Which have same columns. How can I add Two columns -- Partner and Date, which will be filled by values from filenames?
Go to Solution.
filename() function will return blablabla_partner_blabla_date.csv
subfield function will get string delimited by '-'
subfield(filename(), '-', 2) as partner,
subfield(filename(), '-', 4) as date
subfield(filebasename(),'_',-1) as Date,
subfield(filebasename(),'_',-3) as Partner
You can use FileName() function and sub field function to capture the Patner name and Date.
Load *,FileName() as FN ..............
It works. Thanks Cristian
Please take a look at the example.