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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
masplin
Impactful Individual
Impactful Individual

Allocating call time into time buckets

I have a set of data that looks like this

Capture.PNG

 

The task is to work out how many seconds of each call is in 30min time buckets from 8:00 to 19:00

so first case is just 87 in the 12:30 to 13:00 bucket (called 12:30 bucket). The idea is to workout for various logged activities how much time the staff take in each bucket to determine more effeciaint staffing/rostering. 

 

However some call spread over up to 4 time buckets.  For a call that was say starting 13:45:00 finishing 14:15:00 the result needs to be 900 in 13:30 buckets and 900 in 14:00 bucket .

 

I've read quite a few related posts but cant see how to change thme to meet this requirement. I'm sure its trivial for the much cleverer people on this forum. Thisis the start of a big new project so want to get this right and not write some horrible inefficient solution as seems there will be an elegant one out there. 

 

Thanks in advance for any advice

Mike

 

2 REPLIES 2
v-eachen-msft
Community Support
Community Support

Hi @masplin ,

 

I uploaded my test file, you can download and refer to it.

1-1.PNG

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

Hi

 

Yes it works, but not quite what i was expecting as was hoping to create a measure based off a table of time buckets not 18 different columns.  This will be an issue for doing things like the average across the day as will have to be written as an average of 18 columns.  

 

I was thinking of a table of buckets 

 

Start    

08:00   

08:30   

etc

 

Interval=0.5

 

Then feed these times into a calculation so if I put [Start] on the rows of a table it woudl do the calcaution as you have done.  Is it possible to tweak your solution so the VAR aren't fixed  but come from a table of values?

 

Thanks

Mike

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.