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: 
Anonymous
Not applicable

Conditional Join

Trying to Join same table twice but with two different conditions:

HeadCount:
Load
Region,
EmpID,
Unit
From HeadCount.qvd;

Left Join (HeadCount)
Load
Unit,
Region,
Final_Unit
From UnitInfo.xlsx
(ooxml, embedded labels, table is Sheet1)
Where Unit <> 'Commodities';

Left Join (HeadCount)
Load
Unit,
Region,
EmpID,
Final_Unit
From UnitInfo.xlsx
(ooxml, embedded labels, table is Sheet1)
Where Unit = 'Commodities'

First left join should join by Unit and Region and second should joing by Unit, Region and EmpID, but above approcah does not seem to work.

1 Solution

Accepted Solutions
jolivares
Specialist
Specialist

Try to change the name of field FinelUnit of the first table, before the join.

View solution in original post

4 Replies
swuehl
MVP
MVP

Second Join will also join on Final_Unit, won't it?

Anonymous
Not applicable
Author

Yeah, i guess. But do you understand what I'm trying to achieve ?  FinalUnit joined in but in two different ways.

I need FinalUnit joined in but in two different ways.


Thank you.

jolivares
Specialist
Specialist

Try to change the name of field FinelUnit of the first table, before the join.

Anonymous
Not applicable
Author

Thank you Jolivares. I had to introdue another field for second join and then on my chart used conditional dimension to pull the right one.