Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Given a list of tasks with work hours and starting and ending dates, determine if an employee is overworked in any week.
Employee Weeks =
SELECTCOLUMNS(
ADDCOLUMNS(
FILTER(
ADDCOLUMNS(
GENERATE(
DISTINCT('Table'[Employee Id]),
CALENDAR(MIN('Table'[Task Start Date]),MAX('Table'[Task Due Date]))
),
"__IsWeekDay",IF(WEEKDAY([Date],3) < 5,TRUE(),FALSE())
),
[__IsWeekDay] = TRUE()
),
"__Work Hours",8
),
"Employee Id",[Employee Id],
"Date",[Date],
"Work Hours",[__Work Hours]
)
eyJrIjoiODJkMDU5MGItOGJmMi00YTMyLTlhNTYtNDkwNzY3YTFiODQ1IiwidCI6IjRhMDQyNzQzLTM3M2EtNDNkMi04MjdiLTAwM2Y0YzdiYTFlNSIsImMiOjN9