Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Nested IF formula involving greater than a fixed date

Hi all

I am trying to write an expression in Edit Script and facing issues with it. This expression is as follows -

if([POLICYSTATUS]='Inf' and [DOC]>>31/01/2014,'NB',IF([POLICYSTATUS]='Inf' and not [DOC]>>31/01/2014,'RB','Lapsed')) as [NB/RB]

I think I am making some mistakes either in writing IF formula or date expression is wrong.

Can anyone please help me in this regard.

Thanks!

Abhik

1 Solution

Accepted Solutions
sunny_talwar

Try this:

If([POLICYSTATUS] = 'Inf' and [DOC] > MakeDate(2014, 1, 31), 'NB',

If([POLICYSTATUS] = 'Inf' and [DOC] <= MakeDate(2014, 1, 31), 'RB', 'Lapsed')) as [NB/RB]

View solution in original post

2 Replies
sunny_talwar

Try this:

If([POLICYSTATUS] = 'Inf' and [DOC] > MakeDate(2014, 1, 31), 'NB',

If([POLICYSTATUS] = 'Inf' and [DOC] <= MakeDate(2014, 1, 31), 'RB', 'Lapsed')) as [NB/RB]

Not applicable
Author

Great!! Thanks Sunny, it worked smoothly!!