Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I have a bunch of files (abc_2019, abc_2020) which I have extracted YEAR from those file names.
If Max(YEAR) < current year, I want to download last year data as QVD file.
If it's not, we won't do anything.
I have used IF statements after LOAD command but I have not used IF statement outside of LOAD.
I am not even sure whether I can do what I want in Qlik Sense.
Please let me know if you have tried this before.
hello,
You can use a conditional statement inside or outside a load statement but it won't be written the same way.
Outside a load will be :
IF condition Then
what happens if true
ELSE
what happens if wrong
END
You can also use a ELSEIF if you have several cases.
What you need is a loop on the file list and inside the loop the if statement.
https://help.qlik.com/en-US/sense/June2020/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptControlS...
https://help.qlik.com/en-US/sense/June2020/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptControlS...
Best regards,
Simon
hello,
You can use a conditional statement inside or outside a load statement but it won't be written the same way.
Outside a load will be :
IF condition Then
what happens if true
ELSE
what happens if wrong
END
You can also use a ELSEIF if you have several cases.
What you need is a loop on the file list and inside the loop the if statement.
https://help.qlik.com/en-US/sense/June2020/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptControlS...
https://help.qlik.com/en-US/sense/June2020/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptControlS...
Best regards,
Simon