Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Mihai_Pauna
Contributor
Contributor

Join two tables with same columns values but different column names

Hi guys, I'm an absolute beginner with qlik sense and sql in general so i'm sorry if u answered this already but I have tried everything I red on this forum. I have the following situation:

Column AColumn B
111
212
313
422

and

Column B1Column C
11111
12112
13113
14114
22121

 

Two different tables, Column B1 has a few extra values than Column B. When I select 1 on column A I get 11,12,13... from column B, when I select 11 in column B1 I get 111,112,113... I would like to extend the selection from Column A to Column C.

So when I select 1 in Column A I get 111.112.113 in Column C.

I have tried to merge B and B1 in column Z with: [Column B]&' - '&[Column C] as Column Z, but it still doesn't select properly. Using Join couldn't even load the script. I'm sure i did something wrong  but don't know what. Also tried associating the tables in data manager by Column B and B1 but also didn't work properly.

Maybe u guys can help. Thank you.

Labels (1)
4 Replies
Taoufiq_Zarra

@Mihai_Pauna  can you elaborate ou add the expected output ?

what is the relation between Column A,BB1 and C ?

or when you selected 1 in A what is the expected output from B, B1 or C ?

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Mihai_Pauna
Contributor
Contributor
Author

Thank for replying and excuse my late response. So A,B and B1 are categories and C are the products. If I select 1 in A I get 11,12,13 in B and would like to get the same in B1 and 111,112,113,114 in C product 121 being different actually these codes are the ids of the products being organized in this way. I have also found the concatenate function in data manager but it still doesn't link A to C.

Selection in ColumnASelection in ColumnASelection in column BSelection in column B

I have attached some actual examples, as you see if I make a selection in A I get 1141 in B but nothing in C, but if I select 1141 in B I get the right numbers in C but nothing in A, this is after the concatenation, B1 doesn't exist anymore.

Thank you.

Mihai_Pauna
Contributor
Contributor
Author

still stuck on this 😞

Øystein_Kolsrud
Employee
Employee

So you want to connect the two tables by doing a join on B and B1? There are multiple ways of doing this, but a pretty simple way is to simply add a new table that connects the two, like this where "Table1" is the name of the first table in your example:

Connect_B_B1: Load B, B as B1 Resident Table1;