Forum Discussion
Weekly Network Average Hours DAX
Hi,
I need a measure to return the weekly network average hours. My data includes these columns: Store, Employee ID, Week and Hours.
The dax measure should return the average of hours worked for all stores and employees by week.
I'm using this measure:
however it is returning the wrong average and it does not change when i slice by different months.
Help please?
This is an example of the output i want:
| Store | ID | Week | Hours | Weekly Average |
| A | 1 | 1/5/2020 | 4 | 5.6 |
| A | 2 | 1/5/2020 | 6 | 5.6 |
| B | 3 | 1/5/2020 | 4 | 5.6 |
| B | 4 | 1/5/2020 | 5 | 5.6 |
| C | 5 | 1/5/2020 | 7 | 5.6 |
| C | 6 | 1/5/2020 | 8 | 5.6 |
| D | 7 | 1/5/2020 | 7 | 5.6 |
| D | 8 | 1/5/2020 | 6 | 5.6 |
| E | 9 | 1/5/2020 | 4 | 5.6 |
| E | 10 | 1/5/2020 | 5 | 5.6 |
| A | 1 | 1/12/2020 | 5 | 5.9 |
| A | 2 | 1/12/2020 | 6 | 5.9 |
| B | 3 | 1/12/2020 | 5 | 5.9 |
| B | 4 | 1/12/2020 | 8 | 5.9 |
| C | 5 | 1/12/2020 | 4 | 5.9 |
| C | 6 | 1/12/2020 | 7 | 5.9 |
| D | 7 | 1/12/2020 | 6 | 5.9 |
| D | 8 | 1/12/2020 | 5 | 5.9 |
| E | 9 | 1/12/2020 | 7 | 5.9 |
| E | 10 | 1/12/2020 | 6 | 5.9 |
- Anonymous6 years ago
Hi Anonymous ,
Averageweekly = CALCULATE(AVERAGE('Table'[Hours]),ALLEXCEPT('Table','Table'[Week]))Regards,
Harsh NathaniDid I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
2 Replies
- AnonymousNot applicable
Hi Anonymous ,
Averageweekly = CALCULATE(AVERAGE('Table'[Hours]),ALLEXCEPT('Table','Table'[Week]))Regards,
Harsh NathaniDid I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
- AnonymousNot applicable
Hola Harsh,
Marke to answer as a solution. Thanks a lot.
Thalia