Forum Discussion
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):
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 🙂
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"
2 Replies
- amitchandakSuper 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"
- harshjoshiDFrequent Visitor
Thank you 🙂 Appreciate your help 👍