Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Customer | Employee | Sales |
A | 1 | 100 |
A | 2 | 150 |
A | 3 | 80 |
B | 1 | 70 |
B | 4 | 90 |
Table 2: Work hours
Customer | Employee | Work Hours |
A | 1 | 1.5 |
A | 2 | 3 |
A | 3 | 2 |
A | 4 | 1 |
B | 1 | 1 |
B | 4 | 3 |
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!
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...)