Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On May 18th at 10AM EDT we will answer your QlikView questions live. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
swati_rastogi27
Creator
Creator

Dynamic date range for calender

Hi ,

I have a calendar object , wherein , I have hard-coded:

min value as Num(Date#('01/01/2016', 'MM/DD/YYYY'))

max value as Num(today())

How can i make min value dynamic to always be 01/01/current year-1 , so in 2018 , it should be 01/01/2017

There is another requirement to have min value as : Num(Date#('01/01/2016', 'MM/DD/YYYY'))

max value as 12/31/current-year-2, so in 2018 , max value will be 12/31/2016

How can max value be made dynamic?

1 Reply
vinieme12
Champion II
Champion II

Min date for previous year

=YearStart(Addyears(today(),-1))

Max date for previous year

=YearEnd(Addyears(today(),-1))