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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
n1ef5ng1
Creator
Creator

Variable

How do I set year as Current year inside a variable?

curretnly i am using three variable in hard cord format, assuming current year is 2012

Current_Year = 2012

Previous_Year = 2011

Last_Year = 2010

Is there any way I can make the variable more dynamic

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Current_Year = Year(Today())

Previous_Year = Year(Today()) - 1

Last_Year = Year(Today()) - 2

Thanks.

View solution in original post

1 Reply
tresesco
MVP
MVP

Current_Year = Year(Today())

Previous_Year = Year(Today()) - 1

Last_Year = Year(Today()) - 2

Thanks.