Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Please help me with and ,or functions in Qlikview with the below script.

Can anybody correct the below script.I am getting the value -1 for Tier2 field.

Thanks in advance.

  if (CURR_BAL>'100',CURR_BAL) and
   if(Transaction >'5', Transaction or
    if(Type='ACH' or Type='Online-Access',Type)) as Tier2

4 Replies
swuehl
MVP
MVP

Your expression is evaluated as a boolean expression, like (if your if() conditions are all met):

CURR_BAL and ( Transaction or Type)

which is probably true (-1) then.

What do you want to achieve?

Anonymous
Not applicable
Author

Hi,

You should join the qvw so that we understand what you really need.

I think the correct script should be:

if (CURR_BAL>100,CURR_BAL)&
   if(Transaction>5,Transaction,
    if(Type='ACH' or Type='Online-Access',Type)) as Tier2

But you have to clearly explain us what you need to calculate in Tier2

Not applicable
Author

This is what I want in Tier 2

Average Balance > $100 AND (Transactions more than 5 OR type=Direct Deposit OR type=On-line Access)

Please help

swuehl
MVP
MVP

This is again just a boolean expression.

Do you only want to create a boolean flag or put some other value into the new field Tier2?

Like

  if (CURR_BAL> 100 and (Transaction > 5 or match(Type,'ACH','Online-Access') ), 'This is the TRUE value', 'This is the FALSE value')

     as Tier2