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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply

Life Time between creation date and today (format dd:hh:mm).

Hello All

 

I would like to ask for support because I need to create a column to share the ticket lifetime from creation to today().

I know how to do it in Excel but I can't do it in Power BI.

I can share the lifetime in days or in hous, or in minutes, but not the full details: XX days, xx hours, and xx minutes.

 

I use these formulas in Excel:

1. =INT(end-start)&" days "&TEXT(end-start,"h"" hrs ""m"" mins """)

2. =INT(SUMPRODUCT(ends-starts))&" days "&TEXT(SUMPRODUCT(ends-starts),"h"" hrs ""m"" mins """)

 

I created these formulas in power bi:

 

1. Column = INT(rawdata[Life Time (Days)]) &" Days " & INT(MOD(rawdata[Life Time (Days)],INT(rawdata[Life Time (Days)]))*24) & " Hours and " & MINUTE(rawdata[Life Time (Days)]) & " Minutes"

2. 

Column 2 =
var vSeconds=[Life time in Seconds]
var vMinutes=int( vSeconds/60)
var vRemainingSeconds=MOD(vSeconds, 60)
var vHours=INT(vMinutes/60)
var vRemainingMinutes=MOD(vMinutes,60)
var vDays=INT(vHours/24)
var vRemainingHours=MOD(vHours,24)
return
  vDays&" Days & "&
  vRemainingHours&" Hours & "&
  vRemainingMinutes&" Minutes & "&
  vRemainingSeconds& " Seconds"

 

But both formulas are showing only the number of the days and not the all details

 

Many tks for the support.

3 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

You can use the same approach as in Excel.

 

var a = End - Start

return INT(a) & " days " & FORMAT(a,"h") & " hours " & format(a,"m") & " minutes"

View solution in original post

Hello I will do it.

 

Many tks for the information.

View solution in original post

Hello

 

I used your idea and it worked properly. Many tks

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

You can use the same approach as in Excel.

 

var a = End - Start

return INT(a) & " days " & FORMAT(a,"h") & " hours " & format(a,"m") & " minutes"

Hello

 

I used your idea and it worked properly. Many tks

Hello I will do it.

 

Many tks for the information.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.