Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

IF / OR STATEMENT HELP

Hello Qlik Community,

Fairly new to Qlik and the Qlik Community but have heard great things about the support here so I thought I would give it a try. I have been through basic developer training, however I'm running into an issue finding out how to use an If / Or statement in Qlik. I'm trying to evaluate the result of certain columns of a chart using a combination of IF and OR statements. The expected result should populate text if true.

In plain English:

If the field $ Refunds is greater than or equal or $3,000.00, Or # Refunds is greater than or equal to 10, then populate text 'high refunds', if not then populate text 'normal activity'.

Current formula (underlined is where error is occurring).

If ([$ Refunds]>=3000.00,'HIGH $ REFUNDS')

OR ([# Refunds]>=10,'HIGH REFUNDS', 'NORMAL')

I've done this in Excel a thousand times but it doesn't seem the same in Qlik, Any assistance would be appreciated.

4 Replies
sunny_talwar

Try this:

If([$ Refund] >= 3000 or [# Refund] >= 10, 'High Refund', 'Normal')

Not applicable
Author

Thanks Sunny! I think worked great. I must have been overthinking it.

sunny_talwar

Great, I am glad it worked

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Rest assured, the IF() function in QlikView is extremely similar to its Excel counterpart. The major differences are:

  • parameters are separated by comma's (QV) instead of semicolons (Excel)
  • the third parameter of an IF can be left out (Excel, QlikView). In a QlikView expression, when you omit the third parameter, you have to leave out the last comma as well. In Excel, you can choose to include/leave out the last semicolon. You'll get different results in each case however.

Best,

Peter