Forum Discussion

Landcrab's avatar
Landcrab
Helper I
7 years ago
Solved

Staff Worked Hours Vs Rostered Hours

Hi, I am relatively new to Power BI. Trying to create a report that shows: -Employee Name -Hours Worked (Time Slot Summary table) -Expected Hours (rostered hours, based on 'Staff_Hours' table) The R...
  • Landcrab's avatar
    Landcrab
    7 years ago

    Hi LivioLanzo, I managed to simplify the dataset and work out the most difficult part for me - how to translate the Staff_Hours[Daily Hours] into the Time Slot Summary[Rostered Hours] by using of the following DAX code.

     

    Rostered Hours = LOOKUPVALUE(Staff_Hours[Daily Hours], Staff_Hours[EmployeeID], 'Time Slot Summary'[EmployeeID], Staff_Hours[WeekDayNumber], 'Time Slot Summary'[WeekDayNumber]).

     

    The rest should be pretty straight forward. Thanks again for offering to help, next time maybe.