I am working on an if statement in qlikview to find method of payment based on check number, but i keep getting a syntax error.
Can anyone assist please I am not sure what I am doing wrong.
Thank you in advance for any assitance
Hi Use below code.
If(Left([Check Number],1) = 1,'Check',
If(Left([Check Number],1) = 7,'Card',
If(Left([Check Number],1) = 8,'ACH',
If(Left([Check Number],1) = 9,'Wire','Other'))))
Keep in mind that there are two uses of the IF keyword. There is an IF() function that is to be used in expressions and there is an IF control statement that can be used on the outer statement level and in statement blocks but not inside other statements like LOAD.
The IF() function that you seem to be using must be treated as a regular function that accepts parameters and returns a true/false value. IF() function calls can also be nested like regular function calls, as shown in the many examples in this thread.