Reply
Frequent Visitor
Posts: 8
Registered: ‎09-30-2018
Accepted Solution

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


Accepted Solutions
AlB Super Contributor
Super Contributor
Posts: 1,164
Registered: ‎11-12-2018

Re: DATEDIFF help

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


All Replies
AlB Super Contributor
Super Contributor
Posts: 1,164
Registered: ‎11-12-2018

Re: DATEDIFF help

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

Frequent Visitor
Posts: 8
Registered: ‎09-30-2018

Re: DATEDIFF help

Thanks, @AlB, that worked!

 

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

Thank you!

 

 גגדדששד.JPG