Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

quarters for the year

I would like to break quarters into the quarters for a certain year.  For example:  Q1 2015, Q2 2015, Q3 2015

How is that done?

ShareRates:

LOAD
year([Month_datefield/ShareRates])as calendaryearonly,
*;

LOAD

if(match(date(datefield, 'MMM'),'Jan','Feb','Mar') > 0, 'Q1',
if(match(date(datefield,'MMM'),'Apr','May','Jun') > 0, 'Q2',
if(match(date(datefield,'MMM'),'Jul','Aug','Sep') > 0, 'Q3',
if(match(date(datefield, 'MMM'),'Oct','Nov','Dec') > 0, 'Q4')))) as Sharedratesquarter_group,
date(datefield,'MMM-YYYY')as [Month_datefield/ShareRates]

3 Replies
sunny_talwar

May be this:

LOAD
year([Month_datefield/ShareRates])as calendaryearonly,
*;
LOAD
'Q' & Ceil(Month(datefield)/3) as Sharedratesquarter_group,
date(datefield,'MMM-YYYY')as [Month_datefield/ShareRates]
,

Not applicable
Author

thank you

sunny_talwar

Did it work? If it did, would you mind closing the thread down by marking the correct answer above? If not, would you be able to elaborate what is the issue still?

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny