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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.