cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mpalha04 Regular Visitor
Regular Visitor

Help with Time Formatting

I am trying to find the average time elapsed (duration) between different stages in a sign-up process. Every stage is formatted as 3/14/2001 1:30:55 PM (G). I managed to get the duration between each stage as a calculated column as total seconds. I formatted it using the below:

 

Duration1Formatted =
var vDur4='Master Sheet'[Duration1Seconds]
return INT(vDur4/86400) & ":" &
RIGHT("0"&INT(MOD(vDur4/3600,24)),2) & ":" &
RIGHT("0"&INT(MOD(vDur4/60,60)),2) & ":" &
RIGHT("0"&INT(MOD(vDur4,60)),2)

 

It displays as DD:HH:MMSmiley FrustratedS. The issue is that this outputs it as Text, and changing it to any other data type will not work. There are 5 stages, so 4 columns for time elapsed. How do i go about finding an total average time elapsed (or any other calculation) and have it displayed in an appropriate way?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Help with Time Formatting

Check out this post:

 

https://community.powerbi.com/t5/Community-Blog/Aggregating-Duration-Time/ba-p/22486


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!


1 REPLY 1
Super User
Super User

Re: Help with Time Formatting

Check out this post:

 

https://community.powerbi.com/t5/Community-Blog/Aggregating-Duration-Time/ba-p/22486


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!