Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted

Re: IF / OR STATEMENT HELP

Try this:

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

Highlighted
Not applicable

Re: IF / OR STATEMENT HELP

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

Highlighted

Re: IF / OR STATEMENT HELP

Great, I am glad it worked

Highlighted

Re: IF / OR STATEMENT HELP

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