Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

mahitham
Contributor

Flag help

Hi Experts,

Can any one please help me to create the below flag.

When Date 1 is greater than or equal to Date 2 then it  has to show 1 else 0. But when Date 1 and Date 2 both are same getting 0 instead of 1. Please help me on this.

Please find the below attached app.

Thanks in advance.

Date.png

1 Solution

Accepted Solutions
basildur
New Contributor III

Re: Flag help

@mahitham Hi, try this 

=if(num(floor(Date1))>=num(floor(Date2)),1,0)

 

It's probably because of your date format, if you convert in into a floored numeric value it should work.

 

Best Regards,

Vlad

3 Replies
basildur
New Contributor III

Re: Flag help

@mahitham Hi, try this 

=if(num(floor(Date1))>=num(floor(Date2)),1,0)

 

It's probably because of your date format, if you convert in into a floored numeric value it should work.

 

Best Regards,

Vlad

Mauritz_SA
Contributor III

Re: Flag help

Hi Mahitham

Vlad is correct. Your date part of the two dates are the same, but your timestamp of Date2 is bigger. I checked and if(Floor(Date1)>=Floor(Date2),1,0) also works without converting to a number.

Regards,

Mauritz

Highlighted
mdmukramali
Valued Contributor III

Re: Flag help

Hi,

 

can you try something like 

 

=if(floor(Date1)>=floor(Date2),1,0)

Date.PNG