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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
jayvataliya
Frequent Visitor

Weekly Average of Hours worked by Employee

Hi

 

Below is the sample data where I am trying to get the weekly avg of hours worked by an employee.

 

EmployeeIDNameHoursTypeOfHoursStartDateEndDateWeek number
101Emp A72.35Admin time28-12-2003-01-2153
101Emp A91.51Client time28-12-2003-01-21 53
101Emp A55.78Admin time01-02-2107-02-216
101Emp A95.7Client time01-02-2107-02-216
101Emp A49.01Admin time01-03-2107-03-2110
101Emp A123.43Client time01-03-2107-03-2110
101Emp A59.5Admin time29-03-21 04-04-21 14
101Emp A96.63Client time29-03-21 04-04-2114
101Emp A66.32Admin time26-04-21 02-05-2118
101Emp A101.21Client time26-04-21 02-05-2118
101Emp A54.62Admin time31-05-2106-06-2123
101Emp A110.16Client time31-05-21 06-06-2123

 

Any assistance on how can I get avg. hours worked on a weekly basis?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@jayvataliya , Try like

AverageX(summarize(Table, Table[EmployeeID], Table[Week Number], "_1", Sum(Table[Hours])),[_1])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@jayvataliya , Try like

AverageX(summarize(Table, Table[EmployeeID], Table[Week Number], "_1", Sum(Table[Hours])),[_1])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks, @amitchandak .  This is what I was looking for.

One quick que. What is the use of putting _1

I see, _1 is the column name for sum of Hours

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

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.