Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Need help adding a calendar table to my data model

I currently have 3 tables that I need to use to create what I call Employee Productivity.  Those tables are FMS Kronos, PM Productivity, and WO Productivity.  In each of those tables, there are dates associated with when the person worked, when the person did the PM, and when the person did the WO.  I am trying to attach a calendar table so that when I want to get the Employee Productivity for a certain period I can do so.

 

Here is the 3 measure that i have created to make up the Employee Productivity%

Total WO  Prod Labors hours YTD =
CALCULATE(
    SUM('WO Productivity'[Labor_Hours]),
        'WO Productivity'[User Type when WOs was open] = "Shared Services"&&
     YEAR('WO Productivity'[date_opened]) IN {2024}
    )
YTD PM Prod Labor Hours =
CALCULATE(
    SUM('PM Productivity'[Labor_hours]),
        'PM Productivity'[User Type when PMs was open] = "Shared Services"&&
        YEAR('PM Productivity'[open_date]) IN {2024}
    )
 
FMS Tech PROD Hours =
CALCULATE(
    SUM('FMS Kronos'[Rounded_Clocked_Hour_Num]),
    'FMS Kronos'[Kronos_Pay_Code] ="PROD"&&
    'FMS Kronos'[Dept_Num]<>900&&
    'FMS Kronos'[User Type FMS]="Shared Services",
    YEAR('FMS Kronos'[Valid_From_Date]) IN {2024}
)

 

Here is my data model as it is today:

 

 

3 Replies