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
Zarlot531
Helper V
Helper V

Time in Service per day (or month)

So here's what I want to do in BI. I have a dataset that shows me how long each technician spent on each dispatch, and I also have the hours he worked each day. What I want to do is, by week, or month, maybe even as a parameter, select the time period and have the techs ranked by their on-site time % for that time period. However, as you can see in the attached, when a tech has multiple dispatches in one day, I repeat how many hours overall he worked multiple times. So in the first row of the example below, this tech likely did other services that day but that 8.35 hours would be repeated for that line. 

 

Now, if I were doing this by day, it's easy. Just take the average of the overall and the sum of the on site and you can divide the average by the sum to get on-site time for that day. But what happens when I want to view this by month? 

 

Time.JPG

3 REPLIES 3
v-jiascu-msft
Employee
Employee

Hi @Zarlot531,

 

How does it look like in the original format? Can you share a dummy sample? The summarize-function-dax could be helpful.

 

Best Regards,

Dale

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

Thanks for your response. I think what I'm going to do instead is simply have a grouped query that has every parameter I need already in it (day,month,weekend date) and then just run with this. I know there's probably a way to do this within the PowerBI interface with the raw dataset, but I guess I'm just used to SQL. I will look into that formula you provided though, looks promising. I guess I can do the drilldown as a separate report if something sticks out in the summary matrix (someone has a low time on site % etc.). Thanks again. 

 

 

Grouped1.JPG

Zarlot531
Helper V
Helper V

I guess one way to do it is the write a summary query for each way the user may want to see it: day, month, week, etc. But I'd like them to be able to drill down to daily data in each case. 

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.