Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Last Date in Quarter help

Hi All,

I am trying to get the last date in the quarter. How do I convert the following pseudo code to Qlikview?

Function LastDateInQuarter([Year] number, [Quarter] number) As Date

TrueYear = Year + 2000
LastDateInQuarter = LAST_DAY(TO_DATE(Quarter*3||"-01-"||TrueYear,'mm-dd-yyyy'))

End Function LastDateInQuarter

Any suggestions?

Thank you.

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Load

     Date,

     QuarterEnd(Date) as QTREND

Inline

[

  Date

  01/01/2014

  05/01/2014

  10/02/2014

  15/03/2014

  27/04/2014

];

View solution in original post

2 Replies
MarcoWedel

you could use something like

Date(Floor(QuarterEnd(any Timestamp in this quarter)))

regards

Marco

MK_QSL
MVP
MVP

Load

     Date,

     QuarterEnd(Date) as QTREND

Inline

[

  Date

  01/01/2014

  05/01/2014

  10/02/2014

  15/03/2014

  27/04/2014

];