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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
ben-t
Frequent Visitor

datedifference value incorrect

 

Im using a measure to calculate the minutes difference between 2 times. 
But the datediff measure, the calculations between the 2 dates are incorrect. not sure if there's a format setting that I'm missing here. 

 

Example below, difference between 13:00:00 and 13:15:00 should be 15 minutes, but im getting 120. 

Screenshot 2021-08-16 141643.png

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ben-t , if this is measure then it would have data for same group.

If this is a new column. Not no need for sumx. Just use datadiff

 

 

or

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@ben-t , if this is measure then it would have data for same group.

If this is a new column. Not no need for sumx. Just use datadiff

 

 

or

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks, found there were duplicate lines that were grouped together with the same name. 
removed duplicates and calculations correct now. 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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