Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

I need the year for last quarter

Hi Guys,

I need the year for the last quarter, so I need the year for Q3 "2016" in a expression.

Thanks

1 Solution

Accepted Solutions
sunny_talwar

May be

=Year(QuarterStart(Today(), -1))

View solution in original post

4 Replies
varshavig12
Specialist
Specialist

Can you please elaborate your requirement ?

Anonymous
Not applicable
Author

I need a variable expression to tell me what year it was in the previous quarter.  We are in Q1 2017 now, last quarter was Q3 2016, I need an expression to hold the value of 2016, and next quarter when we are in Q2 2017, it will hold the value of 2017.

sunny_talwar

May be

=Year(QuarterStart(Today(), -1))

Anonymous
Not applicable
Author

Thanks Sunny, I was nearly there, I was leaving the year bit out.