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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
RosCoe
New Member

I am trying to convert HH:MM:SS

I am trying to convert HH:MM:SS and I can do that but if there is no HH when I am summing the tabs together on some.  Example:

Staffed TimeAUX TimeTime in 0Time in BreakTime in LunchTime in MeetingTime in TrainingTime in Coaching
168:14:4443:34:4215:48:138:25:5911:14:232:37:14:00:00:00:00
9:09:583:29:160:57:170:14:38:30:02:34:13:00:00:00:00
8:54:482:56:211:35:250:30:21:29:01:08:08:00:00:00:00
8:45:141:53:020:38:13:32:32:35:04:00:00:00:00:00:00

 

Total TAB - becausse the Time in Break is :32:32 it is giving me the Value error.  If I manually type a zero in front  the :32:32 it will come up correct.  I have several tabs for different reps, so I need to be able to put in a formula so I don't have to manually fix every break, lunch etc.  

Staffed TimeAUX TimeTime in 0Time in BreakTime in LunchTime in MeetingTime in TrainingTime in Coaching
773:20:35213:21:5672:36:5139:52:2460:12:0514:15:07#VALUE!#VALUE!
43:42:1515:00:134:40:32#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!
42:18:3510:18:564:02:57#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!
32:27:287:30:423:11:47#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!

 

Any help would be greatly appreciated.

2 ACCEPTED SOLUTIONS

I am using Excel and I got the formula to work.  This is how

 

=Value("0")&D3    

 

Thanks for your help.

View solution in original post

Looks like you're on the wrong forum?

 

By the way your Excel formula returns text. I would expect =VALUE("0"&D3).

Specializing in Power Query Formula Language (M)

View solution in original post

3 REPLIES 3
Eric_Zhang
Employee
Employee

@RosCoe

I think you can add a prefix 00 and extract the right 8 characters.

 

 

let
    Source = Table.FromRows({{"39:52:24"},{":32:32"},{":35:04"},{":00:00"}},{"time"}),
    AddedPrefix = Table.TransformColumns(Source, {{"time", each "00" & _, type text}}),
    extract=Table.TransformColumns(AddedPrefix , {{"time", each Text.End(_,8), type text}})     

in
    extract

 Capture.PNG

 

By the way, may I know how do you do the conversion? DAX or Power Query, as I can see 39:52:24 is not a valid time format as well.

 

I am using Excel and I got the formula to work.  This is how

 

=Value("0")&D3    

 

Thanks for your help.

Looks like you're on the wrong forum?

 

By the way your Excel formula returns text. I would expect =VALUE("0"&D3).

Specializing in Power Query Formula Language (M)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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