Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
amber2000
Creator
Creator

Join 2 fields from one table with one field from another table


Hello everyone,

I have a table [Received]  with 2 Employee fields (FK_Entry_Employee and FK_Close_Employee), they can be different from each other.

I would like to link both fields with one corresponding field [Employee_ID] out of Table [Employee].

First problem: When I try to link the 2 fields to Table Employee I'm getting an error because you can't name 2 fields the same.

Second problem: I would like to see for each Employee fields from table Received the Name and FirstName in one Chart/Table, I can only choose the fields one time. Is it even possible to get the same field twice in one  Chart/Table

To make things more clear to anyone who tries to help I've attached the qvw and source file.

Can anybody help me with these problems please?

Amber

1 Solution

Accepted Solutions
Gysbert_Wassenaar

See attached qvw.


talk is cheap, supply exceeds demand

View solution in original post

7 Replies
Gysbert_Wassenaar

See attached qvw.


talk is cheap, supply exceeds demand
amber2000
Creator
Creator
Author

The first problem of this item I mangage to solve

The second problem is still a mistery.

amber2000
Creator
Creator
Author

Hello Gysbert,

Thanks for the solution, is it possible to explain a little bit what you have done in the expression?

To get the names just concatenate the tables?

Gysbert_Wassenaar

Yes, and add a field, in this case Role, to be able to distinguish between the two different roles the employees have in the process. That field Role is used in the chart expressions to get the correct name in the Entry and Close columns


talk is cheap, supply exceeds demand
amber2000
Creator
Creator
Author

If you use a concatenate like this case

Must you give all the fields from the original table in the concatenate table?

Is it normal that my data takes now 2 times longer to run, in your example it loads only 5 and 9 records.

My table contains almost 2 milj.records and table receiving is read twice so now I'm reading 4 milj.records, is this normal?

Gysbert_Wassenaar

It is possible to concatenate tables and load different fields from the source tables. In this case that is not a good idea.

If you load data from the same table twice then the duration will be twice as long too. In this case we processes the source table twice and the result table will have twice the number of records than the source table. That is normal.


talk is cheap, supply exceeds demand
Not applicable

Hi Gysbert!

Thanks for your contribution!! This is exactly what I was looking for here:

https://community.qlik.com/message/1014297?et=watches.email.thread#1014297

Thanks again

Matt