
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Month End Flag
Hey,
I'm looking to set up a flag for month:
Calendar:
LOAD Date,
IF(Date(Date,'DD/MM/YYYY') = MonthEnd(Date(Date,'DD/MM/YYYY')),1,0) as MonthEnd
From Table.
Why is this not assigning a '1' to the last Date of each month?
Driving me nuts!
Thanks
BR
Accepted Solutions
.png)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Dates are interpreted as numeric values by QlikView. They are usually integers, but the MonthEnd() function returns the las hour, minute and second of that day, so you have to round the number to be interpreted as integer. The following should work:
IF(Date(Date,'DD/MM/YYYY') = Date(Floor(MonthEnd(Date)),'DD/MM/YYYY'),1,0)
Hope that helps.
.png)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Dates are interpreted as numeric values by QlikView. They are usually integers, but the MonthEnd() function returns the las hour, minute and second of that day, so you have to round the number to be interpreted as integer. The following should work:
IF(Date(Date,'DD/MM/YYYY') = Date(Floor(MonthEnd(Date)),'DD/MM/YYYY'),1,0)
Hope that helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks,
Worked a treat!
Kudos!
