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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.