Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
mikegauntlett
Contributor III
Contributor III

Left join not working

Hi Guys, 

 

The script below adds additional 'Of_POM_Number' to the OF table as opposed to only taking the 'Of_POM_Number' s from the the OF table. 

This means that I am loading additional data where it should be eliminated. 

Any help would be greatly appreciated Thanks in advance. 

AARO_Revenue_Date:
load
RecNo() as AARO_Revenue_Date_TABLE_RECNO,
POM_Project_Number as OF_POM_Number,
if(Min(if(AARO_Value > 0, AARO_Period, 99999)) = 99999, now() , Date(Date#(Min(if(AARO_Value > 0, AARO_Period, 99999)), 'yyMM'),'yyyy-MM-dd')) As AARO_Revenue_Period
resident All_AARO_Years where AARO_Account = '3010'
group by POM_Project_Number;

LEFT JOIN (OF)
LOAD OF_POM_Number,
AARO_Revenue_Period AS AARO_Revenue_2
Resident AARO_Revenue_Date;

AARO_Booking_Date:
load
RecNo() as AARO_Booking_Date_TABLE_RECNO,
POM_Project_Number as OF_POM_Number,
if(Min(if(AARO_Value > 0, AARO_Period, 99999)) = 99999, now() , Date(Date#(Min(if(AARO_Value > 0, AARO_Period, 99999)), 'yyMM'),'yyyy-MM-dd')) As AARO_Booking_Period
resident All_AARO_Years where AARO_Account = 'BOOKINGS'
group by POM_Project_Number;

LEFT JOIN (OF)
LOAD OF_POM_Number,
date(AARO_Booking_Period,'dd-MMMM-yyyy')AS AARO_BOOKING_2
Resident AARO_Booking_Date;

 

Labels (1)
2 Replies
vikasmahajan

AARO_Revenue_Date:
load
POM_Project_Number as OF_POM_Number,
RecNo() as AARO_Revenue_Date_TABLE_RECNO,
if(Min(if(AARO_Value > 0, AARO_Period, 99999)) = 99999, now() , Date(Date#(Min(if(AARO_Value > 0, AARO_Period, 99999)), 'yyMM'),'yyyy-MM-dd')) As AARO_Revenue_Period
resident All_AARO_Years where AARO_Account = '3010'
group by POM_Project_Number;

LEFT JOIN (AARO_Revenue_Date)
LOAD OF_POM_Number,
AARO_Revenue_Period AS AARO_Revenue_2
Resident AARO_Revenue_Date;

AARO_Booking_Date:
load
POM_Project_Number as OF_POM_Number,
RecNo() as AARO_Booking_Date_TABLE_RECNO,
if(Min(if(AARO_Value > 0, AARO_Period, 99999)) = 99999, now() , Date(Date#(Min(if(AARO_Value > 0, AARO_Period, 99999)), 'yyMM'),'yyyy-MM-dd')) As AARO_Booking_Period
resident All_AARO_Years where AARO_Account = 'BOOKINGS'
group by POM_Project_Number;

LEFT JOIN (AARO_Booking_Date)
LOAD OF_POM_Number,
date(AARO_Booking_Period,'dd-MMMM-yyyy')AS AARO_BOOKING_2
Resident AARO_Booking_Date;

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
mikegauntlett
Contributor III
Contributor III
Author

Unfortunately not, 

when the OF table is loaded on its own, it works. 

Once the aaro tables are loaded they are adding additional project number. Which should not be loaded.