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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
jbenson
Helper III
Helper III

Avg Wait Time

I am looking for a measure that will tell me the avg wait time of truck waitng to be loaded. i have the initial start time of each ticket and the final time when the truck leaves. what formula do i use to find the average time 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @jbenson ,

I created a sample table.

vcgaomsft_0-1644388932340.png

Then create a measure.

 

Avg Wait Time = 
VAR _days = SUMX('Table',DATEDIFF('Table'[StartTime],'Table'[EndTime],SECOND))/86400/COUNTROWS('Table') 
VAR _times = FORMAT(_days+TIME(0,0,0),"h\hm\ms\s")
VAR _day = INT(_days)
RETURN
IF(_day<>0,_day&"\d"&_times,_times)

 

The result should be like this.

vcgaomsft_1-1644389102609.png

Attach the pbix file for reference.

 

Best Regards,

Community Support Team_Gao

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi,

Does that make sense? If so, kindly mark my answer as the solution to close the case please. Thanks in advance.😊

 

Best Regards,

Community Support Team_Gao

Anonymous
Not applicable

Hi @jbenson ,

I created a sample table.

vcgaomsft_0-1644388932340.png

Then create a measure.

 

Avg Wait Time = 
VAR _days = SUMX('Table',DATEDIFF('Table'[StartTime],'Table'[EndTime],SECOND))/86400/COUNTROWS('Table') 
VAR _times = FORMAT(_days+TIME(0,0,0),"h\hm\ms\s")
VAR _day = INT(_days)
RETURN
IF(_day<>0,_day&"\d"&_times,_times)

 

The result should be like this.

vcgaomsft_1-1644389102609.png

Attach the pbix file for reference.

 

Best Regards,

Community Support Team_Gao

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors