Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Load data from current and last year

Hello,

i have data from year 2014 on the database, however the data is in the format 201401, 201402 and so on.

how could it be done on the script to load data from current and last year without having to do it where date > 201601, i mean, i want it to be automatic so i don´t have to change it on new year.

Thank you

2 Replies
aarkay29
Specialist
Specialist

Create a variable and use it in the where statement

Let vStartDate= Date(YearStart(AddYears(today(),-1)),'YYYYMM');

Where DateField >='$(vStartDate)';

muthukumar77
Partner - Creator III
Partner - Creator III

Hi,

Can you send sample data?

Muthukumar Pandiyan