Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Need an urgent help in the below scenario. Here is the scenario:
We have to load total of four source file into Qlikview for every month and store it into a monthly QVD.
We are loading the file and storing the data in monthly QVD by using the ‘MonthYear’ column in the source file.
For example:
File name could be file1.txt, file2.txt, file3.txt and file4.txt
Every month source will be replaced with new file.
So we will load all the file and based on the MonthYear column and Qlikview will create QVD.
Final QVD will be file1_112016.QVD, file2_112016.QVD, file3_112016.QVD and file4_112016.QVD
Again the File name could be file1.txt, file2.txt, file3.txt and file4.txt (All the month file name will be same.)
Now we want the Qlikview to generate QVD only when all the files are updated otherwise it should through error.
How to achieve this??? Please Help!!! Any help is much appreciated.
Regards
Deepak
Use a loop to run through the files:
For each vFileName in 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt'
Load *,
'$(vFileName)' as FileName
From [$(vFileName)];
Next vFileName
When one file does not exist the load will fail.
NOTE: Change the code inside the loop to make sure it does what you need. The code above is just an example of the loop.