# 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
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.

Thanks!

Abhik

Tags (2)
1 Solution

Accepted Solutions
Highlighted
MVP

## 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]

2 Replies
Highlighted
MVP

## 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]

Highlighted
Not applicable

## Re: Nested IF formula involving greater than a fixed date

Great!! Thanks Sunny, it worked smoothly!!