Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

leocattqv
Contributor

Using IF and OR

Hi All,

I have a list of Step status in records and I need to determine late and overdue.  this is what I have so far, but I get an error out.

Any suggestions?

=COUNT(IF([STATUS_SP] = 'Evaluate' and [EVAL_ONTIME] = 'OnTime') or

( if([STATUS_SP] = 'Evaluate' and [EVAL_ONTIME] = 'OnTime'),1)

1 Solution

Accepted Solutions

Re: Using IF and OR

=COUNT(IF([STATUS_SP] = 'Evaluate' and [EVAL_ONTIME] = 'OnTime' or

[STATUS_SP] = 'Evaluate' and [EVAL_ONTIME] = 'OnTime',1))

6 Replies

Re: Using IF and OR

The red indicates unbalanced parens, And there appear to be no difference between the two ifs. I think this is what you want.

=COUNT(

IF(([STATUS_SP] = 'Evaluate' and [EVAL_ONTIME] = 'OnTime')

,1)

)

-Rob

MVP
MVP

Re: Using IF and OR

for syntax maybe

=COUNT(IF(    ([STATUS_SP] = 'Evaluate' and [EVAL_ONTIME] = 'OnTime') or

                      ([STATUS_SP] = 'Evaluate' and [EVAL_ONTIME] = 'OnTime')

            ,1) )

mov
Esteemed Contributor III

Re: Using IF and OR

=COUNT(IF([STATUS_SP] = 'Evaluate' and [EVAL_ONTIME] = 'OnTime') or
([STATUS_SP] = 'Evaluate' and [EVAL_ONTIME] = 'OnTime'),1)

Re: Using IF and OR

=COUNT(IF([STATUS_SP] = 'Evaluate' and [EVAL_ONTIME] = 'OnTime' or

[STATUS_SP] = 'Evaluate' and [EVAL_ONTIME] = 'OnTime',1))

leocattqv
Contributor

Re: Using IF and OR


thanks all, I really appreciate it,  that did it.

Re: Using IF and OR

Hi,

rwunderlich  is right,

[STATUS_SP] = 'Evaluate' and [EVAL_ONTIME] = 'OnTime' or [STATUS_SP] = 'Evaluate' and [EVAL_ONTIME] = 'OnTime'

is equal to

[STATUS_SP] = 'Evaluate' and [EVAL_ONTIME] = 'OnTime'

so his solution might be the better choice if this is, what you are looking for.

regards

Marco

Community Browser