Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

create date using quarter and year

can we create date from year and quarter field

18 Replies
Not applicable
Author

this give wrong result pfa

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

LOAD *,

MakeDate(Year, Quarter*3) AS Date

INLINE [

    Year, Quarter

    2015, 1

    2015, 2

    2015, 3

    2015, 4

];

Regards,

Jagan.

MarcoWedel

Looks correct

Which result did you expect?

Regards

Marco

jonathandienst
Partner - Champion III
Partner - Champion III

Well its the correct result if you want the first day of each quarter. So what date do you want?

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
settu_periasamy
Master III
Master III

Not applicable
Author

I want all the month

aveeeeeee7en
Specialist III
Specialist III

Hi Try this Script:

MasterCalendar:
LOAD
Date AS CreatedDate,
Month(Date) AS CalendarMonth,
Year(Date) AS CalendarYear,
'Q'&ceil(Month(Date)/3) AS Quarters,
Month(Date) & '-' & Year(Date) AS CalendarMonthAndYear;

LOAD
Date(makedate(2015,1,1)+recno()-1,'DD/MM/YYYY') as Date
Autogenerate makedate(2015,12,31) - makedate(2015,1,1) + 1;

Hope that helps.

Regards

Av7en

qlikviewwizard
Master II
Master II

Hi shweta08,

Please try with jagan  or arulsettu 's advise.

Enclosed the file for your reference.

YrQtr:

LOAD *,

MakeDate(Year, Quarter*3) AS Date

INLINE [

    Year, Quarter

    2015, 1

    2015, 2

    2015, 3

    2015, 4

];

Capture.JPG

jagan
Luminary Alumni
Luminary Alumni

Hi Swetha,

Try this script below

LOAD *,

MakeDate(Year, Quarter*3) AS Date,

SubField(Quarter*3 & '/' & (Quarter*3 - 1) & '/' & (Quarter*3 - 2), '/') AS Month

INLINE [

    Year, Quarter

    2015, 1

    2015, 2

    2015, 3

    2015, 4

];

Regards,

Jagan.