Forum Discussion
Average hours per week
- 7 years ago
Hi,
Drag Employee Name and Start of week to the Table visual and write this measure
=AVERAGE(Tracker[Hours])
Hope this helps.
Hi ezequiel ,
Can you share some more details on the information and data, share an example of the file and expected result?
I made a simple PBIX file and I'm getting changes on a card based on a slicer of the week but this can be different from your results.
Please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490 (courtesy of @Greg_Deckler).
Regards,
MFelix
- ezequiel7 years agoMicrosoft Employee
Hi MFelix
As example an employee has this data
EmployeeName Hours Start of Week WeekNum John 7 7/29/2019 1 John 7 7/29/2019 1 John 7 8/5/2019 2 John 7 8/5/2019 2 John 21 8/5/2019 2 John 2 8/12/2019 3 John 5 8/12/2019 3 John 4 8/12/2019 3 John 2 8/12/2019 3 John 8 8/12/2019 3 John 9 8/12/2019 3 John 2 8/12/2019 3 John 8 8/12/2019 3 Using the formula Avg_hours = CALCULATE(AVERAGE(Tracker[Hours]), ALLEXCEPT(Tracker, Tracker[EmployeeName], Tracker[WeekNum]))
The result I'm getting is 6.79 for the week of 7/29, 8/5, 8/12. The expected result would beWeek of 7/29: 7 hoursWeek of 8/5: 11.67 hoursWeek of 8/12: 5 hoursThanks for the helpEzequiel- Ashish_Mathur7 years agoSuper User
Hi,
Drag Employee Name and Start of week to the Table visual and write this measure
=AVERAGE(Tracker[Hours])
Hope this helps.
- Anonymous6 years agoNot applicable
Hi ezequiel
Did you ever get an answer to this question? I want to do the same thing but I want to work out a 17 week rolling avg per employee...
- MFelix6 years agoSuper User
Hi Anonymous ,
The answer is marked in the post, however this is not a rolling average is just a simple average for the week selection.
Can you share you data and expected result.