Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Join three tables with different fields

Hello all,

I'm new with Qlikview and don't know how to go on now.

I got three tables:

KST:

CostCenterNumber

CostCenterDescription

DATA:

CostCenterDescription

Value1

Value2

WorkedHours:

CostCenterNumber

HoursWorked

I need to link DATA (includes sales etc.) with WorkedHours to now how many hours used for made sales. Problem is, that I got CostCenterNumber in the WorkedHours and CostCenterDescription in the Data, the translation is in KST.

How do I have to script that?

The three tables come from Excel.

Many thanks for your help in advance!

Christoph

1 Solution

Accepted Solutions
alexandros17
Partner - Champion III
Partner - Champion III

to be sure not to exclude any value you can use Always join:

Load * From KST;

join

load * from DATA;

join

load * from WorkedHours;

But I think that the problem comes from different CostCenterDescription,

try, when you load the 2 tables with the field CostCenterDescription to:

Load

...

Upper(Trim(CostCenterDescription)) as CostCenterDescription

...

View solution in original post

6 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Load * From KST;

left join

load * from DATA;

left join

load * from WorkedHours;

replace the load * .... with the loading from Excel.

Let me know

Not applicable
Author

No that doesn't lead to correct results.

Another problem I have forgotten to tell is that I got more CostCenters in "WorkedHours" than in "Data", of course I need to keep them.

alexandros17
Partner - Champion III
Partner - Champion III

So try with

Load * From KST;

left join

load * from DATA;

join

load * from WorkedHours;

Not applicable
Author

Now I got the correct summaration of hours but no values from the DATA table, its all gone.

alexandros17
Partner - Champion III
Partner - Champion III

to be sure not to exclude any value you can use Always join:

Load * From KST;

join

load * from DATA;

join

load * from WorkedHours;

But I think that the problem comes from different CostCenterDescription,

try, when you load the 2 tables with the field CostCenterDescription to:

Load

...

Upper(Trim(CostCenterDescription)) as CostCenterDescription

...

Not applicable
Author

Wow! That seems to be the solution, great! Thanks a lot. I will have a few more checks now.

Have a nice weekend so far