Discussion Board for collaboration related to Creating Analytics for QlikView.
my final target is to exclude from the load values.
The field is a text field, it's the "Filename" of QVD but is composed like YearMonth.
Then I tried to use a variable to exclude always the "Filename" before the last 3 YearMonth.
This is my script but using where at the end of my load seems tha doesn't work.
Here is my script and my qvw.
let vLast3PrevM = date(Floor(MonthEnd(AddMonths(Today(),-3))),'YYYYMM');
LOAD * INLINE [
where date(Floor(MonthEnd(AddMonths(Makedate(Mid(Filename,1,4),Mid(Filename,5,2),Mid(Filename,7,2)),0))),'YYYYMM') > $(vLast3PrevM);
Thanks for your help.
gwassenaar bpn stalwar1 swuehl
Go to Solution.
Don't make it too difficult. Check this script:
let vLast3PrevM = Floor(MonthEnd(AddMonths(Today(),-3)));
WHERE MakeDate(left(Filename, 4), Mid(Filename, 5, 2), 1) > $(vLast3PrevM);
not clear, what you wish to perform:
Load QVD's with a FileDate > than .....
Load QVD's with a certain string in the filename?
edit: Peter Cammaert was faster & solution works
Not sure if this data is from qvd, but if it is, you might be able to use this also
LOAD Date(MonthStart(Today(), -3 + RecNo()), 'YYYYMM') & '.QVD' as Filename
DROP Table Temp;
This works! thx so much Peter!