Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

End of current month calculation

Hello,

I have a statement in my script which gives me projects within a specific time frame. Each month, we want those projects that start/end year to date. Here is the portion of the line:

([Project Finish Date] >= '11/01/2014' and [Project Finish Date] <= '5/31/2015')

*NOTE: Nov 1 is the start of our fiscal year.

So at the beginning of a new month, I have to manually change the Project Finish Date to the last day of the current month. Is there a way to have it calculate this without having to change the date each month?

Any help would be great!

Thanks!

1 Solution

Accepted Solutions
jpenuliar
Partner - Specialist III
Partner - Specialist III

look in help:

MonthEnd(date [, shift = 0])

View solution in original post

3 Replies
jpenuliar
Partner - Specialist III
Partner - Specialist III

look in help:

MonthEnd(date [, shift = 0])

jpenuliar
Partner - Specialist III
Partner - Specialist III

MonthName(date [, shift = 0])

Returns a display value showing the month (formatted according to the MonthNames script variable) and year with an underlying numeric value corresponding to a timestamp with the first millisecond of the first date of the month. Shift is an integer, where the value 0 indicates the month which contains date. Negative values in shift indicate preceding months and positive values indicate succeeding months.

Examples:

monthname ( '2001-10-19' ) returns 'Oct 2001' with an underlying numeric value corresponding to '2001-10-01 00:00:00.000'

monthname ( '2001-10-19', -1 ) returns 'Sep 2001' with an underlying numeric value corresponding to '2001-09-01 00:00:00.000'

Not applicable
Author

Thanks! The MonthEnd worked and this is now my new statement.


([Project Finish Date] >= '11/01/2014' and [Project Finish Date] <= MonthEnd(today(0),0)))