Forum Discussion
homboy27
Helper III
1 year agoLast 2 weeks average/ employee
Please see below data. I am calculating total sales divided by total hours in column I by employee. But I would like to calculate last 2 weeks average by employee in column J. So for example in ...
Syndicate_Admin
Administrator
1 year ago- homboy271 year ago
Helper III
thank you, what is the formuala if I wanted to do average of last 8 weeks?
- v-sathmakuri1 year ago
Community Support
Hi homboy27 ,
Thank you for reaching out to Microsoft Fabric Community.
please find the below measure to calculate for 8 weeks. Also attached the pbix file for reference.
Last 8 Weeks Average =VAR __WeekEnding = MAX ( 'Table'[Week Ending] )VAR __WeekStart = __WeekEnding - 56RETURNAVERAGEX (FILTER (ALLSELECTED ( 'Table'[Week Ending] ),'Table'[Week Ending] >= __WeekStart && 'Table'[Week Ending] <= __WeekEnding),[% Hours])If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
- v-sathmakuri1 year ago
Community Support
Hi homboy27 ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If the responses has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you!!