Hi!
I am facing an issue in Looker when I join two tables: one contains employee emails and their respective manager emails (in case of multiple managers, there are multiple rows for the same employee), and the other contains employee training hours.
Problem:
When I join these tables by email to calculate the total training hours, the result becomes inflated. In my table without the join, the total training hours for all employees is correct. However, after joining the tables, the total increases. I think Looker is summing the hours for each row, which leads to a duplicate count of hours for employees who have multiple managers.
Example of Access Table:
The access table looks like this:
As Manager 3, I need to be able to view data from Employee1, Manager1, and Manager2.
Table for Training Hours:
In the second table, I track training hours for each employee, including the hours attended and other relevant data. The issue arises when I try to join this table with the access table and calculate the total training hours.
Questions:
- Why does this duplication of hours occur after the join?
- How can I fix the join to ensure the hours are correctly aggregated without duplication?
- Would it help if I restructure the access table so that each employee has only one row, with multiple manager columns, rather than multiple rows?
Any advice or suggestions on how to handle this issue would be greatly appreciated!
Thank you!