Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Nitaci
Contributor II
Contributor II

Adding values to a subcolumn?

Hello all,

I have the table of type

Talbe1:

+--------+-------+
| Name1 | Value |
+--------+-------+
| A | 3 |
+--------+-------+
| B | 4 |
+--------+-------+

and I also have a have another table that looks like

Table2:

+--------+-------+
| Name1 | Name2|
+--------+-------+
| A | A1 |
+--------+-------+
| A | A2 |
+--------+-------+
| B | B1 |
+--------+-------+
| B | B2 |
+--------+-------+
| B | B3 |
+--------+-------+

Now I want to combine these tables in such a way, that I get 

FinalTable:

+--------+-------+-------+
| Name1 | Value | Value |
+--------+-------+-------+
| A | A1 | 3 |
+--------+-------+-------+
| A | A2 | 3 |
+--------+-------+-------+
| B | B1 | 4 |
+--------+-------+-------+
| B | B2 | 4 |
+--------+-------+-------+
| B | B3 | 4 |
+--------+-------+-------+

All of the tables are loaded trought standard load. 
Load * from Table1 

 

I've tried using join, concatenate and apply map, but I've had no succes. Any tips?

Labels (1)
1 Solution

Accepted Solutions
Or
MVP
MVP

If both of these are loaded from the same source table, and they're both simple loads, why not just:

Load Name1, Name2, Value

From Table1;

Otherwise, a straightforward JOIN should work here:

Load Name1, Value

From Table1;

Left Join

Load Name1, Name2

From Table2;

If these don't solve your problem, you'll likely need to do a better job of explaining the issue, as this solution should work with the scenario and sample data you described in your post.

View solution in original post

2 Replies
MayilVahanan

Hi

If both tables has common field (Name1), in that case, its normal Qlik behavior  to get ur desired results.

Not sure, how its not working, did u check the table viewer to confirm the tables are join (linked) correctly.

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Or
MVP
MVP

If both of these are loaded from the same source table, and they're both simple loads, why not just:

Load Name1, Name2, Value

From Table1;

Otherwise, a straightforward JOIN should work here:

Load Name1, Value

From Table1;

Left Join

Load Name1, Name2

From Table2;

If these don't solve your problem, you'll likely need to do a better job of explaining the issue, as this solution should work with the scenario and sample data you described in your post.