Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
provie98
Contributor II
Contributor II

HELP WITH AN IF STATEMENT IN THE LOAD

Here's my current If Statement:

IF("EOY_BankOwned_Bal" > 0, IF(ISNULL("Cust_Branch_Nbr_EOY"),"Cust_Branch_Number",IF("EOY_BankOwned_Bal" = 0, IF(ISNULL("Cust_Branch_Nbr_EOY"),"Cust_Branch_Number","Cust_Branch_Nbr_EOY")))) as Cust_Branch_Final

Basically, here's what I want it to do. 

If the EOY_BankOwned_Bal > 0 and the Cust_Branch_Nbr_EOY is null then use the Cust_Branch_Number

BUT

If the EOY_Bank_Owned_Bal = 0 and the Cust_Branch_Nbr_EOY is null then use the Cust_Branch_Number

ELSE

Use Cust_Branch_Nbr_EOY

Let me know if there is something wrong with the if statement above because it's not working.

Thanks!

Amber

1 Solution

Accepted Solutions
IAMDV
Luminary Alumni
Luminary Alumni

Hi Amber,

You can use the "And" and "OR" operators to evaluate two conditions. And you don't have use Nested IF's. Please try the below expression and if it doesn't work then please can you post the sample QVW file?

IF(

     (EOY_BankOwned_Bal > 0   AND ISNULL("Cust_Branch_Nbr_EOY"))

          OR

     (EOY_Bank_Owned_Bal = 0 AND ISNULL("Cust_Branch_Nbr_EOY")),

Cust_Branch_Number,

     Cust_Branch_Nbr_EOY)

Hope this helps!

Cheers - DV

www.QlikShare.com

View solution in original post

3 Replies
IAMDV
Luminary Alumni
Luminary Alumni

Hi Amber,

You can use the "And" and "OR" operators to evaluate two conditions. And you don't have use Nested IF's. Please try the below expression and if it doesn't work then please can you post the sample QVW file?

IF(

     (EOY_BankOwned_Bal > 0   AND ISNULL("Cust_Branch_Nbr_EOY"))

          OR

     (EOY_Bank_Owned_Bal = 0 AND ISNULL("Cust_Branch_Nbr_EOY")),

Cust_Branch_Number,

     Cust_Branch_Nbr_EOY)

Hope this helps!

Cheers - DV

www.QlikShare.com

provie98
Contributor II
Contributor II
Author

Thanks a lot!  This worked perfectly!  I knew it could be done, I just didn't know how. 

IAMDV
Luminary Alumni
Luminary Alumni

That's great. You are welcome. Please check my blog for more QlikView video tutorials. Here is the link :

www.QlikShare.com

Happy learning.

Cheers - DV