I have a table in an Excel file that contains weekly productivity performance for employees. The columns are:
I need to create a report from this table in which a user selects a range of week ending dates and employee IDs. The report should return:
I've used Power Query to add the table to the data Model and then Power Pivot to get 1, 2 (FIRSTDATE), 3 (LASTDATE), and 4 ((LASTDATE-FIRSTDATE)/7).
Power Query
Power Pivot
I need to do a lookup using the employee ID and first week (and again with last week) worked. I've been unsuccessful using DAX functions LOOKUPVALUE and CALCULATE (with and without FILTERS) to return 5 and 6. I can do it in Excel with XLOOKUP and SUMIFS, but using these with the returned pivot table gets ugly when rows are added or removed upon refresh.
I can calculate 7 in two ways.
I assume that if a Power Pivot solution can be found for 5 and 6, I could plug them into the second method so Power Pivot returns it, too.
Any suggestions on how to do this or a different approach I could use?
- Week_Ending (end date of week; weeks are Mon-Sun)
- Supervisor_Name
- Employee_ID
- Kronos_Hours
- Earned_Hours
- Productivity_Pct (static value but calculated as Kronos_Hours/Earned_Hours)
- Direct_Utilization_Pct
I need to create a report from this table in which a user selects a range of week ending dates and employee IDs. The report should return:
- Employee ID
- Ending date of the first week the employee worked during the range
- Ending date of the last week worked
- Number of weeks from first week worked to last week worked
- Productivity % for first week worked
- Productivity % for last week worked
- Rate of change of Productivity % from first week worked to last week worked
I've used Power Query to add the table to the data Model and then Power Pivot to get 1, 2 (FIRSTDATE), 3 (LASTDATE), and 4 ((LASTDATE-FIRSTDATE)/7).
Power Query
Power Pivot
I need to do a lookup using the employee ID and first week (and again with last week) worked. I've been unsuccessful using DAX functions LOOKUPVALUE and CALCULATE (with and without FILTERS) to return 5 and 6. I can do it in Excel with XLOOKUP and SUMIFS, but using these with the returned pivot table gets ugly when rows are added or removed upon refresh.
I can calculate 7 in two ways.
- Excel's RRI function
- ([Last Productivity %]/[First Productivity %])^(1/[# of Weeks])-1
I assume that if a Power Pivot solution can be found for 5 and 6, I could plug them into the second method so Power Pivot returns it, too.
Any suggestions on how to do this or a different approach I could use?