Forum Discussion
Tad
4 years agoFrequent Visitor
Calculate Hours Employee should have worked
Hello all, Your help is appreciated in advance. Sharing dummy data to help. I am attempting to calculate the hours an employee should have worked given a start date, a termination date or tod...
- 4 years ago
I acheived my desired result by doing a DAX CROSSJOIN between the Calendar and the Combined Time Queries table.
new table = CROSSJOIN(SUMMARIZECOLUMNS('Combined Time Entries'[Employee Name],'Combined Time Entries'[EMAIL_ADDRESS]),DISTINCT('Calendar'[Date]))NOTE: I have to use email address as it essentially the Employee ID between my databases.I then created calculated columns to check if the employee was employed on the date and another to check it the date was a weekday. I was then able to calculate how many hours the employee should have worked that day.
Tad
4 years agoFrequent Visitor
I acheived my desired result by doing a DAX CROSSJOIN between the Calendar and the Combined Time Queries table.
new table = CROSSJOIN(
SUMMARIZECOLUMNS('Combined Time Entries'[Employee Name],'Combined Time Entries'[EMAIL_ADDRESS]),
DISTINCT('Calendar'[Date]))
NOTE: I have to use email address as it essentially the Employee ID between my databases.
I then created calculated columns to check if the employee was employed on the date and another to check it the date was a weekday. I was then able to calculate how many hours the employee should have worked that day.