Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
kevbrown
Creator II
Creator II

Load most recent QVD

Fairly straight forward one I'm sure

I've just loaded 2 qvds into a QlikView document. Next month I'll have a third qvd and then a firth and so on. All I want to do it load the third one in and not the first teo. The qvds are called Filename&Date. I'm sure there's a straight forward way to script it to just load the most recent qvd

Thanks

2 Replies
kevbrown
Creator II
Creator II
Author

Ok so I need something like

Revenue:
LOAD
FileName() AS File,
COVERAGE_EFFECTIVE_DT,
[Coverage Year],
[Coverage Month],
[Coverage Day],
[Revenue Year],
GROSS_PREMIUM_USD_AMT_NR,
GROSS_REVENUE_USD_AMT,
NET_PREMIUM_USD_AMT_NR,
NET_REVENUE_USD_AMT,
[Risk Number],
[Revenue Month],
[SIC Description],
CUSTOMER_TRANSACTION_NUMBER_TX,
[Revenue Day],
Division,
Opco,
[Office Name],
Zone,
Dept,
[PM CDT_SYSTEM_CD],
[Risk Bearer Type],
[ICG Agency Type],
Insured
FROM
$(vQVDPath)Revenue*.qvd]
(qvd);

let path_Pallet = \\gblonfc11\mc-glob\UK National Placement MI\Kev Brown\Reload Dashboard\2. Dashboard Reload\3. QVD Output\Revenue*.qvd'

;

for each File in filelist (path_Pallet)
AAA:
LOAD '$(File)' as FileName AutoGenerate 1;
next File

Tab:
LOAD MaxString(FileName) as lastFile Resident AAA;
LET myFile = Peek('lastFile', 0, 'Tab');
DROP Table AAA, Tab;

MyOnlyTable:
LOAD * From $(myFile);