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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to use data from two tables

Question for everyone.  If I have data in one table that contains lets say Total Employee cost as HeadCount and then Monthly Spend in another table called MonthlySpend how can I use each data to calculate monthly spend per employee?  Currently if I use them in a chart together I do not receive any results.  Do I have to do like a resident load on the script and create the calculate field?

1 Solution

Accepted Solutions
JonnyPoole
Former Employee
Former Employee

Hi Jason ,  both headcount and monthly spend tables need to have a common key like Employee ID.

If they do, ensure that you alias the matching fields the same way in the load script (ex below)

ex:

Headcount:

load

     employee as [Employee ID],

     [Total Employee Cost]

from <>;

MonthlySpend:

load

     employeeCode as [Employee ID],

     [Monthly Spend]

from <>;

Does this help ?

View solution in original post

2 Replies
JonnyPoole
Former Employee
Former Employee

Hi Jason ,  both headcount and monthly spend tables need to have a common key like Employee ID.

If they do, ensure that you alias the matching fields the same way in the load script (ex below)

ex:

Headcount:

load

     employee as [Employee ID],

     [Total Employee Cost]

from <>;

MonthlySpend:

load

     employeeCode as [Employee ID],

     [Monthly Spend]

from <>;

Does this help ?

Not applicable
Author

That did help.  I actually ended up just doing a preceding load and creating a new table with the data I needed for that one chart.