Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
siddharthsoam
Partner - Creator II
Partner - Creator II

I want to extract previous quarter from date

Hi ,

I want to fetch the previous quarter exit date whenever I select a recent quarter date. For example if I select a date 31-Aug-2017 it should return 30-Jun-2017. if I select 31-May-2017 it should return 31-Mar-2016

1 Solution

Accepted Solutions
sunny_talwar

Or this

Date(Floor(MonthEnd(Max(Date), -3)))

MonthEnd(Max(Date), -3) should take your 3 months back

Floor() should make a timestamp back to a date

Date() can be used for formatting

View solution in original post

3 Replies
shraddha_g
Partner - Master III
Partner - Master III

Date(Monthend(Addmonths(Max(DateField),-3)),'DD-MMM-YYYY')

shraddha_g
Partner - Master III
Partner - Master III

Date(Addmonths(QuarterEnd(Max(DateField)),-3),'DD-MMM-YYYY')

sunny_talwar

Or this

Date(Floor(MonthEnd(Max(Date), -3)))

MonthEnd(Max(Date), -3) should take your 3 months back

Floor() should make a timestamp back to a date

Date() can be used for formatting