Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

Case 891 How to combine 2 left join into one ?

Hi All

I like to know it is possible to combine Section B and C into one ?

// Section A
tab1:
LOAD * INLINE [
COY_NAME,LAST_NAME,Email
XYZ,STEVEN,
ACB,
ABC,????,
ABB,MOM,
ABB,POW,0rts@stee.stengg.com
ADD,WEE,0rts@stee.stengg.com
AAA,KIM
AAA,RAT,catherine@mattenplant.com.sg

];

// Section B

Left Join(tab1)
LOAD COY_NAME,
If(Concat(Email)='', 'N', 'Y') As F_COY_NO_EMAIL
Resident tab1
Group By COY_NAME;

// Section C

Left Join(tab1)
LOAD LAST_NAME,
If(Count(Email)>1, 'Y', 'N') As F_DUP_EMAIL,
If(Concat(Email)='', 'N', 'Y') As F_NO_EMAIL,
If(Concat(LAST_NAME)='', 'N', 'Y') As F_NO_LAST_NAME,
If(Concat(DISTINCT LAST_NAME)='????', 'N', 'Y') As F_LAST_NAME_???
Resident tab1
Group By LAST_NAME;

 

1 Solution

Accepted Solutions
Saravanan_Desingh

The GROUP BY Fields and JOIN Keys are different in Section B & C. So, I don't think you can merge these two.

View solution in original post

2 Replies
Saravanan_Desingh

The GROUP BY Fields and JOIN Keys are different in Section B & C. So, I don't think you can merge these two.

paulyeo11
Master
Master
Author

Thank you sir