Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Not applicable

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

1 Solution

Accepted Solutions

Month End Flag

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.

View solution in original post

2 Replies

Month End Flag

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.

View solution in original post

Not applicable

Month End Flag

Thanks,

Worked a treat!

Kudos!