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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Invalid numeric representation of date value: DATEDIFF

Hi 

 

I am trying to calculate 'Resolve Time' for incidents. I worked out the forumula, however the DAX formula is not returning the values for incidents which were open for a longer period of time. 

 

Resolve_Time = DATEDIFF(SUM('Call Request Detail'[OpenDate]), SUM('Call Request Detail'[ResolveDate]), DAY)

 

Below mentioned screenshot represents the  incidents which are opened and closed within 3 days.

 Resolve_time short period of time.PNG

However, if an incident is open for a longer period of time i.e. if an incident is opened on 25/11/2018 and closed on 06/12/2018. The calculation doesn't seem to be working. the follwing error pops out. 

 

Resolve_time Eror.PNG

 

FYI: I am using a direct connection to the DW, hence using the SUM function in my calculation. I understand that we can not access the source columns in DAX formulas when we use direct connection. 

 

Any advice will help me out. 

1 REPLY 1
Anonymous
Not applicable

The SUM( ) of a date sounds... odd at best.  In the grand total you are *actually* adding dates, which... I'm surprised is even legal 😛 

I would do MIN() for Open and MAX( ) for Resolve... ?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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