Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

QUarter: how to create by date

LOAD date(Invoice_Date,'DD/MM/YYYY') as Invoice_Date,

Year(Invoice_Date) as Year,

Month(Invoice_Date) as Month,

QuarterName(Invoice_Date) as Quarter,

How to create a quarter like Q1, Q2..??

5 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

'Q' & Pick(Num(Month(Invoice_Date)), 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4)

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
mvanlutterveld
Partner - Creator II
Partner - Creator II

Hi,

Try the following: 'Q' & ceil(num(month(Invoice_Date))/3) as Quarter

ashfaq_haseeb
Champion III
Champion III

Hi,

try below

'Q'&ceil(month(TempDate)/3) AS Quarter

Replace TempDate with your date.

Regards

ASHFAQ

Not applicable
Author

Hi Sandeep,

Use the below statement:

LOAD date(Invoice_Date,'DD/MM/YYYY') as Invoice_Date,

Year(Invoice_Date) as Year,

Month(Invoice_Date) as Month,

'Q'  & ceil(month(Invoice_Date)/3) as Quarter,

Thanks

Sabal

antoniotiman
Master III
Master III

Hi,

also function QuarterName(Date)

QuarterName('02-01-2014') -> gen mar 2014

Regards,

Antonio