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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
debabrata_sahoo
Contributor III
Contributor III

how to set variable on previous year

How to set variable on previous year date.

Example

when I select a date on date field like '23-Jul-2018' then same time variable value is '23-Jul-2017'.

Please help me out.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

AddYears(today(), -1)

AddYears(Date, -1)

View solution in original post

4 Replies
arvind1494
Specialist
Specialist

Hi

23-Jul-2018

24-Jul-2018

25-Jul-2018

26-Jul-2018

27-Jul-2018

28-Jul-2018

29-Jul-2018

Use this in the defination of your variable

tresesco
MVP
MVP

AddYears(today(), -1)

AddYears(Date, -1)

dapostolopoylos
Creator III
Creator III

Check the attached app:

Father/Husband/BI Developer
fabdulazeez
Partner - Creator III
Partner - Creator III

AddYears(Max(datefildl), -1)