Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I've a problem i'd like you to help me to solve: i've 3 different sources to use to import data:
- an excel for the current month: A.xls
- 12 file for the previous 12 months: yearmonth_B.xls
- in case of lack of the previous month, i've a further excel file. C.xls
For instance: today my A file is 201410.xls, if I can't find B file 201409.xls 'ive to use C.xls
I've created 2 variables:
let vMonthMax=peek('Month',0,tmp)
let vMonthPrec=peek('Month_prec',0,tmp)
but i've no idea how to put the condition to check if there is file B. Can you help me?
Tks
Hi
you can use the below.
if isnull(FileTime($(vMonthPrec) & '.xls')) then
Load from c.xls
else load from B.xls
End if
You may find this useful:
http://www.qlikviewaddict.com/2012/02/checking-file-exists.html