Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Load the Rolling 1 year records in Qlikview script.

Hi All,

I want to load the rolling 1 year record in qlikview script dynamically. Can anyone assist me.

If script running now (04/28/2017) means, the script should load all the records between (04/28/2016 to 04/28/2017).

If script running  on (04/28/2017) means ,the script should load all the records between (04/29/2016 to 04/29/2017).

Regards,

ShakilaD

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Two conditions are same. I am assuming may be typo error

Here, you can write like below

If Today() Then

Load * From <Data Source> where DateField >= Today() and DateField <= AddYears(Today(), 1)

Else

Load * From <Data Source>

End If

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

3 Replies
Anil_Babu_Samineni

Two conditions are same. I am assuming may be typo error

Here, you can write like below

If Today() Then

Load * From <Data Source> where DateField >= Today() and DateField <= AddYears(Today(), 1)

Else

Load * From <Data Source>

End If

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Thanks Anil, its working.

Anil_Babu_Samineni

Awesome, Can you close this thread by flag of Correct Answer

Qlik Community Tip: Marking Replies as Correct or Helpful

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful