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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
NavinReddy
Creator II
Creator II

Variable Creation for set Analysis

Hi All,

I have a Query will you plz help me any one

I need to be create one Variable ,It should disply Previous Three Years Data,

One more Variable should display Current Year Data

Will You plz help me

Thanks in Advance

Niranjan

2 Replies
Not applicable

vCurrentYear = Year(Today())

vPreviousThreeYears = Year(Today()-3) //This gives you the year for three years ago.

if you are talking about Rolling3threeYears i would do llike this:

vRollingThreeYears: ='>=Year(Today()-3) <=Year(Today())'

NavinReddy
Creator II
Creator II
Author

Hi

Thanks a lot it will really helpful

Thanks & Regards

Niranjan