Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

yasmine_benatti
New Contributor

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
Highlighted

Re: QuarterYear

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

2 Replies
Highlighted

Re: QuarterYear

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

yasmine_benatti
New Contributor

Re: QuarterYear

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