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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Calculating Average Sleep Time

Hi all, 

 

I am looking to calculate average sleep time for participants in a study.

I have used this measure:

Sleep Time Avg = FORMAT(AVERAGE(sleepSummaryDaily[sleepTime.2]),"HH:MM")
But it is returning a time of 19:58... I think this is due to the participant going to sleep past 12am so therefore the calculation is going clockwise. 
Below is the sample data set for this participant which with the measure above is giving me 19:58. I split the sleep time date/time column into date column (Sleep Time.1) and time column (Sleep Time.2)
CalendarDateParticipant IDSleep Time.1Sleep Time.2
15th December 2022

1001

14th December 2022

22:08:00

16th December 2022100115th December 202223:07:00
17th December 2022100116th December 202223:30:00
18th December 2022100118th December 202200:11:00
19th December 2022100118th December 202222:19:00
20th December 2022100119th December 202221:45:00
21st December 2022100120th December 202223:11:00
22nd December 2022100121st December 202223:34:00

 

Thanks

Chris

5 REPLIES 5
Anonymous
Not applicable

@Anonymous -what is your expected output?

Anonymous
Not applicable

I see you got a solution to my problem as I received an email but I cannot see the solution posted here?

Thanks

Anonymous
Not applicable

that was by mistake. i got solution but that is also giving different answer it is giving 10:58.

 

Anonymous
Not applicable

No problem, I hope you can come up with the solution 🤞

Anonymous
Not applicable

22:58:00?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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