Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I have a folder with 3 years of data (monthly exports .csv files) there are total 36 files in the folder and names of files are Sales_Jan2023, Sales_Feb2023,Sales_Mar2023.
I am trying to load only the latest 6 months of data out of 36 files, How Can I do that, please help.
Hi @Mohammed_Sohail ,
as you don't have too much data files in the folder. Why not manually combine 6 months csv files to one csv file then load to Qlik Sense app?
Let latest_period_date = today(); //a date represented in the latest period file
Let no_of_months = 6;
For _month_no = 0 to no_of_months-1 do
let _period = date(addmonths('$(latest_period_date)',-$('_month_no)'),'MMMYYYY');
LOAD *
FROM [Lib://data/Sales_$(_period).csv (txt,...);
Set _period=;
Next _month_no