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

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

Reply
Anonymous
Not applicable

time differe

Vishal_Kumar_R_0-1710784389977.png

by using date difference 11-03-2024 16:00:00 -11-03-2024 13:20:08 expected is 00 02:39:52 but caming as 30 02:39:52 how to over come this and why it showing 30 days 


1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

I made simple samples and you can check the results below:

vtianyichmsft_0-1710815747219.png

Measure = var _D1 = DATEDIFF(MAX('Table'[Created Date]),MAX('Table'[Updated Date]),DAY)
var _D2 = MAX('Table'[Updated Date]) - MAX('Table'[Created Date])
RETURN COMBINEVALUES(" ",_D1,FORMAT(_D2,"hh:mm:ss"))

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous ,

 

I made simple samples and you can check the results below:

vtianyichmsft_0-1710815747219.png

Measure = var _D1 = DATEDIFF(MAX('Table'[Created Date]),MAX('Table'[Updated Date]),DAY)
var _D2 = MAX('Table'[Updated Date]) - MAX('Table'[Created Date])
RETURN COMBINEVALUES(" ",_D1,FORMAT(_D2,"hh:mm:ss"))

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Super Working tnq @Anonymous 

Dangar332
Super User
Super User

hi, @Anonymous 

use datediff( ) fuction

like below

column=
datediff(table[last updated date],table[created date],hour)

 

if you want it in minute then simply change HOUR to MINUTE

Anonymous
Not applicable

Tnq for replying

But instead of datediff we can also do difference  in power query but I want to be except the same output value to find the average date and time for all the records  but it showing 30 

Helpful resources

Announcements
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.