Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ibrewop23
Frequent Visitor

Calculating Employee Average Hours per Month (using Weekly Hours)

I am attempting to calculate the average number of working hours per month per employee using their weekly hours against their job. 

 

1 employee can have multiple jobs active at any time. Each job has a weekly hour value, a job start and end date. The assumption is made that an employee works 7 days a week each month of the year from the start to the end date of their job.

 

Example Data:

ibrewop23_0-1674066730095.png

 

Employee 1 is not a problem. I can do the following (correct me if this is wrong):

VAR SOMcurrent = MIN ( 'DateTable'[Date] )
 
VAR EOMCurrent = MAX ( 'DateTable'[Date] )
 
VAR HoursPerWeek =
    CALCULATE (
        SUM ( 'Job'[Hours] ),
        FILTER (
            'Fact Job',
            'Fact Job'[StartDate] <= SOMcurrent 
                && 'Fact Job'[EndDate] >= EOMCurrent 
        )
    )
 
Hours Per Month = HoursPerWeek / 7 days * days in selected month

Employee 2 is tricker because their jobs don't start or end at the end of the month AND they're jobs have crossover, therefore their contract hours need summed and then averaged.
 
I have written a long dax statement using further calculates, date filtering by MONTH and YEAR. But I need to specifiy this to calculate at the employee level in the DAX. And I am a unsure as to how I can achieve this.
 
Thanks in advance.
1 REPLY 1
Villezekeviking
Most Valuable Professional
Most Valuable Professional

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors