cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

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:MM:SS. 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
Highlighted
Super User IX
Super User IX

Re: Help with Time Formatting

Check out this post:

 

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


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




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

Proud to be a Super User!




View solution in original post

1 REPLY 1
Highlighted
Super User IX
Super User IX

Re: Help with Time Formatting

Check out this post:

 

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


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




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

Proud to be a Super User!




View solution in original post

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors
Users online (650)