Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If Greater Than Today

Hello all,

Had a quick question regarding making a slight tweak to a script. I wish to filter on anything greater than today's date. Here is my existing script that basically just says today.

if( (([Project.Revised Date]-today()=-0) AND Project.Flag=0), 1)

Also, is it possible to change the script to allow for any date greater than December 31, 2014?

Regards,

M

2 Replies
JonnyPoole
Former Employee
Former Employee

You have 2 conditions in there . Only one refers to date. You can replace the first one to filter for Dates > Today as follows. 

if( ((    [Project.Revised Date] > today()) AND Project.Flag=0), 1)


For your 2nd question you can use makedate() function to compare to a constant:


if( ((    [Project.Revised Date] > MakeDate(2014,12,31)) AND Project.Flag=0), 1)

or consider the last day of today's year:

if( ((    [Project.Revised Date] >yearend(today())) AND Project.Flag=0), 1)

MarcoWedel

if([Project.Revised Date]>today() AND not [Project.Flag], 1)