Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

provie98
New Contributor II

Preceding Load on a Load

Hey all,
Is there anyway to do a calculation from two tables?  I'm stuck on the logic on this.  I tired a preceding load on a load and it's not working.  Here's an example.  When I go to load it, I get an error telling me that LL_Acct_Current_Balance is not found.  I'm thinking it's cause I have an left join involved.  Any ideas?
LOANS:
LOAD


if( "LL_Acct_Current_Balance" > 0 AND "User_Alpha1" = 'CBS',1,0) as Count_LL_CBS,

*;



LOAD
     "Bank_Number",
     "Account_Number",
    
   
"User_Date5",

   
if("User_Alpha1" = 'CBS',1,0) as CBS_Count,

   
if("User_Alpha1" = 'LTV',1,0) as LTV_Count,

   
if("User_Alpha1" = 'DTI',1,0) as DTI_Count,

   
"User_Alpha1",

   
SQL SELECT
     "Bank_Number",

    "Account_Number",
  
    "User_Date5",

    "User_Alpha1"
   
FROM "WB_Business_Objects".dbo.LOANS;



LEFT JOIN (LOANS)



LOAD

    "Acct_Nbr" AS Account_Number,

    if("LL_Acct_Current_Balance" > 0 ,1,0) as Count_LL,

   
"LL_Acct_Current_Balance";


SQL SELECT

    "Acct_Nbr",
    "LL_Acct_Current_Balance"
  
FROM "WB_Business_Objects".dbo."Monthly_New_Loan_Volume_Comparisions";



1 Solution

Accepted Solutions
MVP
MVP

Re: Preceding Load on a Load

Hi,

You will need to do the join, store the table into a QVD file, then load it doing the "Count_LL" field instead of a preceding load. It's because the JOIN, indeed, because when the preceding load is done, the field "LL_Acct_Current_Balance" does not exist, it will be created in that table after the JOIN.

Hope that helps.

Miguel

1 Reply
MVP
MVP

Re: Preceding Load on a Load

Hi,

You will need to do the join, store the table into a QVD file, then load it doing the "Count_LL" field instead of a preceding load. It's because the JOIN, indeed, because when the preceding load is done, the field "LL_Acct_Current_Balance" does not exist, it will be created in that table after the JOIN.

Hope that helps.

Miguel

Community Browser