Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
ml2023
Contributor
Contributor

Error in expression: If takes 2 -3 parameters

I am new to Qlik Sense and am having trouble with this sequence:

The idea is that in the first situation the cell is painted in green and in the second condition in red, what am I doing wrong?

 

if(if(isNull (fields_resolutiondate),Interval(fields_updated-[Fecha Creacion], 'DD')) <= 10,'green',


if(isNull(fields_resolutiondate),Interval(fields_updated-[Fecha Creacion],'DD')) > 11,'red')

 

Thank you, for your help!

Labels (2)
1 Solution

Accepted Solutions
Or
MVP
MVP

If() does indeed take 2-3 parameters:

If(Condition, Then, Else)

You can use multiple conditions, e.g.

If(1=1 AND (2=3 OR 2=2),Then,Else)

And you can nest if statements (two or more as required), e.g.

If(Isnull(SomeField), If(SomeOtherField > 10,Green,Red))

View solution in original post

2 Replies
Or
MVP
MVP

If() does indeed take 2-3 parameters:

If(Condition, Then, Else)

You can use multiple conditions, e.g.

If(1=1 AND (2=3 OR 2=2),Then,Else)

And you can nest if statements (two or more as required), e.g.

If(Isnull(SomeField), If(SomeOtherField > 10,Green,Red))

ml2023
Contributor
Contributor
Author

Thank you for your answer