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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
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.

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

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

tresB
Champion III
Champion III

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)