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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
su_pyae
Creator
Creator

Joining tables with two common columns

I have two tables. 

This is table 1.

Account NumberTextStarting BalanceYear
1"Ending Balance"$5002020
2"Ending Balance"$2002020
3"Ending Balance"$5502020

 

This is table 2. This table has a lot of accounts but I only want the accounts that are in Table 1. 

AccountTextCurrent BalanceDate

1

title A$5001/01/2021
1title B$2002/11/2021
1title C$1502/14/2021
2title B$1001/15/2021
2title D$2004/15/2021
3title A$2505/13/2021
3title M$1201/03/2021
3title N$11001/22/2021

 

This is what I want. 

AccountTextStarting BalanceCurrent Balance 
1"Ending Balance"   
1title A   
1title B   
1title C   
2"Ending Balance"   
2title B   
2title D   
3"Ending Balance"   
3title A   
3title M   
3title N   

 

I am having trouble joining them when I have two columns with the same name. 
Is there a way to join two tables like this or my logic simply wrong? 

Labels (1)
1 Solution

Accepted Solutions
AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hi,

You can concatenate these two tables to get all Account and Text values into one single column.

 

Thanks,

Ashutosh

 

View solution in original post

3 Replies
AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hi,

You can concatenate these two tables to get all Account and Text values into one single column.

 

Thanks,

Ashutosh

 

su_pyae
Creator
Creator
Author

Thank you. Actually, the post needed a bit more information. 

The second table has a lot of accounts but I only need the info about account in Table 1. 

su_pyae
Creator
Creator
Author

I just used WHERE to restrict the account. 😄