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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

KeyA if B IsNull - KeyB if B IsNotNull

Below is what my code looks like.  What I am ultimately trying to accomplish is that table C should relate to table B if B_ID is populated, but table A if B_ID is not populated.

Link:

NoConcatenate

LOAD

    A_ID

Resident TableA;

LEFT JOIN (Link)

LOAD

    B_ID,

    A_ID

Resident TableB;

LEFT JOIN (Link)

LOAD

    C_ID,

    A_ID

Resident TableC

WHERE IsNull(B_ID);

LEFT JOIN (Link)

LOAD

    C_ID,

    B_ID

Resident TableC

WHERE Not(IsNull(B_ID));

1 Reply
JonnyPoole
Former Employee
Former Employee

If you get a chance , 3 sample files (table A,B,C)  and 1 combined result (joined table) would help clarify the need.