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
harshjoshiD
Frequent Visitor

Days.Time to Text

Hello all 🙂

 

I have a pbix file which contains a column of Time calculation in the format of Days.hh:mm:ss (shown below):

harshjoshiD_0-1661148396892.png

I want to convert it to Text format i.e 4 Days 07 Hours 56 Minutes 00 Seconds

 

It would be really helpful if I could get some help here. Thanks 🙂

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@harshjoshiD , It should be a duration column in the Power query, then you can have a new column  like

 

= Number.ToText(Duration.Days([Time to Mitgate]) ) & " Days " &

Number.ToText(Duration.Hours([Time to Mitgate]) ) & " Hours" &

Number.ToText(Duration.Minutes([Time to Mitgate]) ) & " Minute" &

Number.ToText(Duration.Seconds([Time to Mitgate]) ) & " Second"

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@harshjoshiD , It should be a duration column in the Power query, then you can have a new column  like

 

= Number.ToText(Duration.Days([Time to Mitgate]) ) & " Days " &

Number.ToText(Duration.Hours([Time to Mitgate]) ) & " Hours" &

Number.ToText(Duration.Minutes([Time to Mitgate]) ) & " Minute" &

Number.ToText(Duration.Seconds([Time to Mitgate]) ) & " Second"

Thank you 🙂 Appreciate your help 👍

harshjoshiD_0-1661150100395.png

 

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.