Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
siva_boggarapu
Creator II
Creator II

Current Month,Current Quarter, Last Month,Last Quarter?

Hi All,

I have requirement to show Current Month,Current Quarter, Last Month,Last Quarter data in Desiner Part. Can one help me on this?

Thanks,

Siva

4 Replies
Gysbert_Wassenaar

Current Month: =Month(Today())

Current Quarter: =Year(Today())&'Q'&ceil(Month(Today())/3)

Last Month: =Month(monthstart(Today(),-1))

Last Quarter: =Year(monthstart(Today(),-1))&'Q'&ceil(Month(monthstart(Today(),-1))/3)


talk is cheap, supply exceeds demand
siva_boggarapu
Creator II
Creator II
Author

Hi Gysbert,

Thanks for your reply.

My requriement has been changed little again. Actually I have a data only 2010 and 2011.

My requirement is 01-May-2011 need to show as Current Month

lly                        01-APR-2011 need to show as Last Month

Current Quarter            01/04/2011 - 30/06/2011

Previous Quarter          01/01/2011 - 31/03/2011

Thanks,

Siva

jagan
Luminary Alumni
Luminary Alumni

Hi Siva,

Try like this in script

Data:

LOAD

*,

AddMonths(AddYears(DateFieldName, 3), 2) AS NewDate

FROM DataSource;


Now use the new field for your analysis.

Regards,

Jagan.

Not applicable

Try something like this

Instead of Today() use Max(Date) like

Current month : month(max(Date))