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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
sruthi19
Contributor II
Contributor II

How to create quarters dynamically from particular year

Hi All,

I have to create a Quarter field, from year 2017 in below format. I dont have any date field, how can i generate quarters.

Q1-2017,

Q2-2017,

Q3-2017

.

.

.

Q1-2020

Q2-2020

Q3-2020

Q4-2020

 

3 Replies
MayilVahanan

Hi @sruthi19 

Try like below

Left(YourDateField, 2) as Quarter

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
sruthi19
Contributor II
Contributor II
Author

Hi,

I dont have any date field, i want to generate quarters from Year  2017 by creating a variable.

Quarters:

Q1-2017........Q4-2020

GaryGiles
Specialist
Specialist

Depending on how you plan to utilize this field, you could use:

ValueList('Q1-2017','Q2-2017','Q3-2017', . . . .,'Q1-2020','Q2-2020','Q3-2020','Q4-2020')

Or you could use a date function within the Valuelist to create Quarter start dates.