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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
provie98
Contributor II
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
Miguel_Angel_Baeyens

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

View solution in original post

1 Reply
Miguel_Angel_Baeyens

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