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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
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.

Labels (1)
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

];