Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Contributor II

Nested If statement evaluating variable values

I have an expression that is evaluating two variable values and giving a up or down arrow based on the outcome.  I need to add another check to this expression to test for another value of a variable.  It is basically an If Then Else, but I'm not sure how to write it and/if there is a cleaner way to do it.

Current Expression:

If(vCY>vLY, chr(9650),chr(9660))

Added Variable Check:

If((vFlag) = 'Yes'

Added Expression for above value of 'No':

If(vPrjCY>vPrjLY, chr(9650),chr(9660))




1 Solution

Accepted Solutions
Highlighted

Re: Nested If statement evaluating variable values

May be this:

If(vFlag = 'Yes',

     If(vCY>vLY, Chr(9650), Chr(9660)),

     If(vPrjCY>vPrjLY, Chr(9650), Chr(9660)))

View solution in original post

3 Replies
Highlighted

Re: Nested If statement evaluating variable values

What happens when vFlag = 'Yes'? May be something along these lines

If(vFlag = 'Yes', SomeExpressionOrValue,

     If(vPrjCY>vPrjLY, chr(9650),chr(9660)))

Highlighted
Contributor II

Re: Nested If statement evaluating variable values

If the vFlag = 'Yes', then the current expression is used.

Highlighted

Re: Nested If statement evaluating variable values

May be this:

If(vFlag = 'Yes',

     If(vCY>vLY, Chr(9650), Chr(9660)),

     If(vPrjCY>vPrjLY, Chr(9650), Chr(9660)))

View solution in original post