# New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for
Did you mean:
Highlighted
Not applicable

## IF statement with more than one condition (Script)

What is going wrong in the following script?

Only when Spend_time is according to the conditions A = NO, B = hour and C=Prestatie I want de value of Spend_time to be saved als Spend_Hours, else, return value zero.

IF (A ='NO',

IF (B ='hour', IF(C ='Prestatie', Spend_time,
0),0),0)
AS Spend_hours,

1 Solution

Accepted Solutions
Highlighted

Hi

If I understood you correctly:

If(A = 'No' And B = 'hour' And C = 'Prestatie', Spend_time, 0) As Spend_hours,

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
3 Replies
Highlighted

Hi

If I understood you correctly:

If(A = 'No' And B = 'hour' And C = 'Prestatie', Spend_time, 0) As Spend_hours,

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Highlighted
Not applicable

Hi,

Try to put all the conditions together as If( A='NO' and B='hour' and C='Prestatie', Spend_Time, 0) as Spend_Hours.

Not applicable

Hi,

try

if((A ='NO') AND (B ='hour') AND (C ='Prestatie'), Spend_time,'0') as Spend_hours