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

Difference between to date/time data type

Hello Power BI enthusiast,

 

I would like to calculate the time difference between two date/time data type. I have used the dax function of DATEDIFF as shown below but I think the precision is not correct

TimeDifference.pngTimeDifference2.jpg

 

When I checked using online calculator, I got the correct value of time difference . Is there any other way to write DAX in order to get the correct precision value ? 

Days between two days.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Try this dax.

Hi @Anonymous 

 

diff = DATEDIFF('Table'[Start Date],'Table'[End date],SECOND)
 
 
Date.PNG
 
Cheers,
Pravin Wattamwar

View solution in original post

2 REPLIES 2
az38
Community Champion
Community Champion

Hi @Anonymous 

try without .[Date]. it cut datetime to only Date

 = datediff(V_Incident[Created].[Date];V_Incident[Updated].[Date];SECOND)

do not hesitate to give a kudo to useful posts and mark solutions as solution

LinkedIn

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

Try this dax.

Hi @Anonymous 

 

diff = DATEDIFF('Table'[Start Date],'Table'[End date],SECOND)
 
 
Date.PNG
 
Cheers,
Pravin Wattamwar

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.