Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewforum
Creator II
Creator II

Adding month to the Variable

I have a variable called zDates='2016_07'. I need to check whether QVD's with the date already exists in appropriate location or not.

Name of the QVD will be as below.

Employee_M.2016_05.qvd
Employee_M.2016_06.qvd

In this case since 2016_07 qvd does not exists in the file system I need to add that date to the variable. So the variable now should have zDates='2016_07','2016_06'.

If the value in the variable is zDates='2016_06' then there wont be any changes in the varaible it will remain same. That is zDates='2016_06'

If the file system contains below qvd's and the variable zDates='2016_01' then in that case the variable should be updated to zDates='2015_12',2016_01'

Employee_M.2016_11.qvd

Employee_M.2016_12.qvd


Can someone help me to achieve this?

32 Replies
qlikviewforum
Creator II
Creator II
Author

It will be always comparing one value with one only. I will not be comparing one value with two at any case. Since zSecondLoadDates and zDates can be same at times. If it is not same then in that case we are appending like below

zSecondLoadDates=zSecondLoadDates&chr(44)&zDates;

I did manual check looks to be fine. Need to check with difference scenarios.

adamdavi3s
Master
Master

Is it all up and running OK now?

Please remember to mark this as helpful or the correct answer if I have helped you or answered your question.

qlikviewforum
Creator II
Creator II
Author

Marked as helpful answer. Sorry for the delay. Thanks