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

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