Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am fetching publisher log information from the server. However, the for loop is not working.
only whatever mentioned in the variable, can fetch the respective logs.
Actually, need to fetch the Tasklog information for the last 7 days but only 1-day of information is visible.
Attached is the file for the same.
Need some advice on this.
Thanks in advance.
QlikView Qlik Sense
You have given half question, We don't know what to checka and which is not working. Would you like to rephrase your question?
updated the comment,
You are using only one date in the variable?
Let yesterdate = Date(Today()-1, 'YYYYMMDD');
But also, I can see that you are doing too much for that, I would rather use simply like this
Let yesterdate = Date(Today()-1, 'YYYYMMDD');
Let weekbackyesterdate = Date(Today()-8, 'YYYYMMDD');
for each Tasklog in FileList('D:\Publisher Logs\1\Log\TaskLog.txt')
RLdata:
LOAD '$(Tasklog)' as FileName,
@1,
@2,
@3
FROM $(Tasklog)
(txt, utf8, no labels, delimiter is '\t', msq) Where Field>=$(weekbackyesterdate) and Field<=$(yesterdate);
May I know the Field in the above logic? and the field column is not there in the original table.
Field is something about you want to compare with date field.
But where to fetch the field. that is not available in the table.
Can you share the file name as an example so that i can give complete script?
PFA.
The file is in different folders and the nested for loop is required to fetch data from them.
Check all these If something can be achieved via Sub routine? Here