Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
ZimaBlue
Creator
Creator

Defining a column for join if it's not null

I have table_1:

month_start_date partner campaign
1-10-2021 partner1 test1
1-5-2021 partner2 test2

 

and table_2:

month_start_date partner campaign money
1-10-2021 partner1 test1 100
1-3-2021 partner5 - 500
1-5-2021 partner2 test2 300
1-11-2021 partner10 - 500

 

What I expect:

- the amount from the money column should be joined to table_1 to the partner->campaign correspondences for those rows where both fields are filled in table_2.

- For lines in which in table_2 campaign = "-" I want to see money joined simply by the partner field. I expected that due to the same column name, qlik would be able to figure it out, but it doesn't seem to be able to do that.

How do I explicitly indicate what to do in this case?

Now i use just:

Left Join (table_1)
load [month_start_date], [partner], [campaign], [money] resident table_2;

Labels (2)
1 Solution

Accepted Solutions
ZimaBlue
Creator
Creator
Author

I found the following solution:

for all empty capmaign in table_1, I assigned the value "-", so the script finds "-" as the match for join.

View solution in original post

1 Reply
ZimaBlue
Creator
Creator
Author

I found the following solution:

for all empty capmaign in table_1, I assigned the value "-", so the script finds "-" as the match for join.