cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
andris_
Resolver I
Resolver I

average starting/finishing time

Hey everyone,

 

we have a data table with technicians (~40 technicians) who work in zones (5 zones). We're trying to create a report which contains monthly performance analysis about them. But we have an issue with the average starting and finishing time.

 

The average starting (and finishing) time measure is working perfectly when we use it on technician level. The measure is the following:

Average Starting Time =
VAR Result =
AVERAGEX ( VALUES ( 'Date'[Date] ); CALCULATE ( MIN (DataTable[Travel Starting Time] );DataTable[Weekday/Weekend]="Weekday" ) )
RETURN
IF ( NOT ( ISBLANK ( Result ) ); Result + TIME ( 0; 0; 0 ) )

(So, it returns the average of the minimum of the travel starting times a day, which works for daily, weekly and monthly periods as well)

 

The problem is that when we use it on zone level, it is not working, because it picks the lowest travel starting time from every day, which is obviously wrong, because what we need is the average of lowest travel starting times from every technician (from the particular zone) a day, and after the average of that (so, the average of the average daily lowest travel starting times).

 

You can ask yourself the question "Why this guy needs the lowest travel starting times?". The answer is, because every technician have a few service orders a day, and each service order has its own starting time. And in our case, we need the lowest one, because, of course that will be the starting time of the technicians' workday. (We have the same problems with the finishing time. In that case, we need the max of the finishing times a day.)

 

Here's some sample data:

samplekep.PNG

 

I hope my problem is clear, but if it isn't, don't hesitate to hit me with questions, please! 

 

Thanks in advance,

Andris

2 REPLIES 2
v-qiuyu-msft
Community Support
Community Support

Hi @andris_,

 

Regarding the sample data, what's the expected results? Would you please clarify it?

 

Best Regards,
Qiuyun Yu

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

Hi @v-qiuyu-msft,

The sample data is not the best to explain it, I just wanted to show how the data looks like. But let's assume that all of the 4 technicians (Name1, Name2, Name3, Name4) are from the same zone. So, we'd like to choose from each day from each technicians the lowest starting date, calculate the average of it for a period (month) for each technicians (that's what the measure I've mentioned can do), and after calculate the average of the technicians' average starting time.
I hope now it's clear.

Regards,
Andris

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors