Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
salleninsd
Creator
Creator

Using if statement for a date range syntax

Hello,

I am trying to set a 'Y' or a 'N' flag on a date dimension for a date range from 15 days ago through yesterday.  I think I'm close, but I am having trouble with the syntax:

=if([Worker.HireDate]= '>=$(=date#(Today()-15)) <=$(=date#(Today()-1))','Y','N')

if statement date.JPG

if statement date result.JPG

I've also tried =if([Worker.HireDate]= '>=$(=date(Today()-15,'YYYY-MM-DD')) <=$(=date(Today()-1,'YYYY-MM-DD'))','Y','N')

I appreciate any suggestions to resolve the issue!

Scott

1 Solution

Accepted Solutions
Vegar
MVP
MVP

 

Try this

IF([Worker.HireDate]>=(today()-15) AND  [Worker.HireDate]<=(today()-1) , 'Y','N')

View solution in original post

2 Replies
Vegar
MVP
MVP

 

Try this

IF([Worker.HireDate]>=(today()-15) AND  [Worker.HireDate]<=(today()-1) , 'Y','N')

salleninsd
Creator
Creator
Author

Yes, that worked!  Thank you soooo much for your help!

Scott