Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

QuarterYear

Hello,

Is there any way to get the date representation:  QuarterYear

For example:

For 3 years {2015, 2016, 2017}

I want to get the representation: QuarterYear: {Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8, Q9, Q10, Q11, Q12}


Thank you

Yasmine

1 Solution

Accepted Solutions
sunny_talwar

May be this

'Q' & (Ceil(Month/3) + Year - 2015) as QuarterYear

You should be able to make this dynamic rather than using hard coded 2015 by finding the min year and using a variable with peek to use here instead of 2015

View solution in original post

2 Replies
sunny_talwar

May be this

'Q' & (Ceil(Month/3) + Year - 2015) as QuarterYear

You should be able to make this dynamic rather than using hard coded 2015 by finding the min year and using a variable with peek to use here instead of 2015

Anonymous
Not applicable
Author

Hi,

Yes this is exactly what I wanted, I also changed the format to get my desired results.

Year(TempDate)&': Q' & ceil(Month(TempDate)/3) as QuarterYear

Thank you Sunny