Forum Discussion
Anonymous
6 years agoNot applicable
Measure Help - Average Hours a Week Grouped into Buckets
I have the following table with the following columns Time: Emp ID | Date | Week | # of Hours Charged Data goes back 10 weeks Week =Time[Date] - weekday(Time[Date],2) +1 Ive been asked to cr...
GunnerJ
6 years agoPost Patron
Below is a formula I used for my own buckets. I think if you adapt it to your data you should get what you need. Before you use it though just create a measure that takes the average of the hours charged and use that as the field being put into buckets. Let me know if this helps!
Usage_Buckets = if(YRMO_USAGE[BI_USAGE] <= 20000, "10,000 - 20,000", if(YRMO_USAGE[BI_USAGE] <= 40000, "20,001 - 40,000", if( YRMO_USAGE[BI_USAGE] <= 60000, "40,001 - 60,000", "60,000+")))
- Anonymous6 years agoNot applicable
All of this makes sense with the buckets, but how do I make sure those buckets are calculating the weekly average hours? What calculation do I use to make sure the average measure is the average hours in a week (not a day, or by row in the table).