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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Nested If Statement Validation

Hello folks,

I have noticed that a case that should be picked up by the 4th line of code in the statement below is actually passing thru to the 5th line.

After spending some time looking at this statement, I am unable to identify where it is going wrong, so am hoping someone could help me trouble shoot my logic, syntax?

( If(Level='Lvl 1' and open_date+30 < Today(), 0,

If(Level='Lvl 1' and open_date+30 >= Today(), NetWorkDays(Today(),open_date+30),

If(Level='Lvl 2' and open_date+60 < Today(), 0,

If(Level='Lvl 2' and open_date+60 >= Today(), NetWorkDays(Today(),open_date+60),

0)))))

Thank-you!

Dan

2 Replies
alexandros17
Partner - Champion III
Partner - Champion III

each date has its numerical rapresentation so you must decide if using a numerical or a date format when you manage data

so:

open_date+30 < Today()  shoult be changet to

Num(open_date)+30 < Num(Today())

and so on

Let me know

maxgro
MVP
MVP

what's the case (open_date) you think has problem?