Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.
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.
Thanks,
Worked a treat!
Kudos!