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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
shainis
Helper I
Helper I

DATEDIFF help

Hi,

 

I'm trying to calculate DATEDIFF but getting weird results... I would like to see in "Column" 1.5, 1.5, 2, 1.5 etc.

I'll appreciate your help with that.

Thanks!

 

3212321.JPG

1 ACCEPTED SOLUTION
AlB
Community Champion
Community Champion

Hi @shainis

 

A few questions:

Can you share the pbix? Are [EndDate] and [EventDate] measures? Can you show their code?

Is what you want to calculate a column or a measure?

 

In the meantime, try this instead:

     ([EndDate] - [EventDate]) * 24

 

which should yield the difference in hours

View solution in original post

2 REPLIES 2
AlB
Community Champion
Community Champion

Hi @shainis

 

A few questions:

Can you share the pbix? Are [EndDate] and [EventDate] measures? Can you show their code?

Is what you want to calculate a column or a measure?

 

In the meantime, try this instead:

     ([EndDate] - [EventDate]) * 24

 

which should yield the difference in hours

Thanks, @AlB, that worked!

 

An alternative solution would be to use the Time Subtruct. Both are doing the job.

Thank you!

 

 גגדדששד.JPG

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.