Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us for a live Q&A! September 21, 10 AM ET - Onboarding Fast in Qlik Sense SaaS! REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
kmstephenson
Creator
Creator

most recent quarter end date

Hi All,

I have an EndDt field in format YYYY-MM-DD. I would like to return the value of the most recent quarter end date.

For example, if my EndDt is 2017-07-31, I would like to return 2017-06-31 (Q2 EndDt). If my EndDt is 2015-09-30, this falls on a quarter end date so this would return the same value - 2015-09-30.

Thanks!

Tina

1 Solution

Accepted Solutions
YoussefBelloum
Champion
Champion

Hi,

Try this:

QuarterEnd(QuarterStart(EndDt )-1)

View solution in original post

3 Replies
mdmukramali
Specialist III
Specialist III

Hi,

Can you try something like this

=If(QuarterEnd(EndDt)=EndDt,EndDt,

          QuarterEnd(Date(QuarterStart(EndDt)-1,'YYYY-MM-DD')))

YoussefBelloum
Champion
Champion

Hi,

Try this:

QuarterEnd(QuarterStart(EndDt )-1)

View solution in original post

maxgro
MVP
MVP

1.png

LOAD

     EndDt,

     Date(Floor(

          IF(Date(EndDt, 'YYYY-MM-DD')=Floor(QuarterEnd(Date(EndDt, 'YYYY-MM-DD'))),

               EndDt,

               QuarterEnd(Date(EndDt, 'YYYY-MM-DD'), -1)

     ) ), 'YYYY-MM-DD') as Q2EndDt

;

load * inline [

EndDt

2017-07-31

2015-09-30

];