cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
AAAbbbnewbie
Regular Visitor

How to convert the text value "50:23:06" to seconds in Power Query,

Hi, how should i convert below time value exceed 24hours to seconds in PBI? Please help~~~

 

AAAbbbnewbie_0-1689673058678.png

 

1 ACCEPTED SOLUTION
ppm1
Solution Sage
Solution Sage

Add a custom column in the query editor and put this expression in the pop-up box.

let 
hms = List.Transform(Text.Split([Other Work], ":"), each Number.From(_)),
result = hms{0}*60*60 + hms{1}*60 + hms{2}
in 
result

Pat

Microsoft Employee

View solution in original post

4 REPLIES 4
ppm1
Solution Sage
Solution Sage

Add a custom column in the query editor and put this expression in the pop-up box.

let 
hms = List.Transform(Text.Split([Other Work], ":"), each Number.From(_)),
result = hms{0}*60*60 + hms{1}*60 + hms{2}
in 
result

Pat

Microsoft Employee

Thank you so much ! it works perfectly for me! 

mlsx4
Super User
Super User

Hi @AAAbbbnewbie :

- First, in Power Query, separate the time by character : (You will get three columns: hours,minutes and seconds).

 

-Then, create a custom column: 

 

Time= [Other work Hours]*3600+[Other work Minutes]*60+[Other work Seconds]

 

 

Thanks for sharing 🙂 

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors