Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Not applicable

Help needed with date flag

Hi Community,

I am trying to create a date flag in script, it looked simple but somehow im not able to get it working as required. My date column is in the format 'MMM-YYYY'. what i want to acheive is that if the date has passed then the flag should be set to 0 else 1, but im unable to get it working.

Ive used an expression like below:

if(floor(num(MonthYr))<=floor(num(date#(today(),'MMM-YYYY'))), 0, 1) as MonthYr_Flag,

where the format of MonthYr is 'MMM-YYYY'.

Any help will be greatly appreciated.

1 Solution

Accepted Solutions
MVP
MVP

Re: Help needed with date flag

IF(Date#(MonthYr,'MMM-YYYY') <= Date(Today(),'MMM-YYYY'),0,1) as Flag

View solution in original post

2 Replies
MVP
MVP

Re: Help needed with date flag

IF(Date#(MonthYr,'MMM-YYYY') <= Date(Today(),'MMM-YYYY'),0,1) as Flag

View solution in original post

Not applicable

Re: Help needed with date flag

Thanks Manish