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: 
abhaysingh
Specialist II
Specialist II

logic help

hi,

i have one logic

if(isnull(DateSubmitted),DateDueGracePeriod,DateSubmitted ) as DateNew,

DateDueGracePeriod= these include the dates till year 2020, but i want to restrict it at backend .


i want in DateDueGracePeriod always there would be dates less than today, shud not exceed 16 dec 2015..


how i can do this?

Labels (1)
3 Replies
swuehl
Champion III
Champion III

if(isnull(DateSubmitted),Date(RangeMin(DateDueGracePeriod,Today())),DateSubmitted ) as DateNew,

gsbeaton
Creator II
Creator II

When you say restrict in the backend, I presume you mean in the Load Script?

In the case I think you want something like

LOAD *

FROM [yourSource.QVD]

WHERE DateDueGracePeriod <= Today;

There are other ways you could go about this, but hopefully this will get you started.

sunny_talwar
MVP
MVP

May be something like this:

LOAD YourFields,

          If(IsNull(DateSubmitted), DateDueGracePeriod, DateSubmitted) as DateNew,

FROM Source

Where not IsNull(DateSubmitted) or Num(DateDueGracePeriod) <= Num(Today());