Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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

Tags (2)
1 Solution

Accepted Solutions
Highlighted

Re: Nested IF formula involving greater than a fixed date

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
Highlighted

Re: Nested IF formula involving greater than a fixed date

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

Highlighted
Not applicable

Re: Nested IF formula involving greater than a fixed date

Great!! Thanks Sunny, it worked smoothly!!