Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
TobiasTebben
Contributor III
Contributor III

Aggregate Numbers form linked tables?

Hello,

this questions has probably been asked many times before, but no matter how long I search for an answer, I cannot find anything useful.

I have two Tables (from different sources):

Table 1: Sales

CustomerEmployeeSales
A1100
A2150
A380
B170
B4

90

 

Table 2: Work hours

CustomerEmployeeWork Hours
A11.5
A23
A32
A41
B11
B43

 

In my data model, these tables are linked by "Customer".

Now, if in my analysis I create a table with the dimension "Customer" and the columns sum(WorkHours) and sum(Sales), I get the expected result., i.e. the sales and work hours per customer.

However, if I create an additional table with the dimension "Table1.Employee" (or "Table2.Employee") and the columns sum(WorkHours) and (Sales), I get wrong/unexpected results, not the sales and work hours per employee.

If I change my data model and link the tabels by "Employee" instead of "Customer", the second analysis works, but not the first.

Any help is highly appreciated!

 

1 Reply
TobiasTebben
Contributor III
Contributor III
Author

I found the solution myself:

The dimension for the table has to be

"if(table1.employee=table2.employee,table1.employee)"

 

(First I thought the solution to my problem was the formula of the measure...)