Skip to main content

Hello! I’m being asked to create a report where we can see if a project is adhering 75% to the original timeline. I thought about creating a custom field based on a formula which would divide $BaselineDuration by a value that is calculated from a field with the formula DateDiff($BaselineDueDate,$ActualEndDate,’d’). I get an error when doing this,  “Error: Data types Numeric and Duration not compatible for '/' operation” If I try to save DateDiff($BaselineDueDate,$ActualEndDate,’d’) as a duration instead of a numeric value, I get the error: Error: Formula evaluation result data type is Numeric instead of expected Duration.

Hi Eric,

It sounds like the Field Type for your custom field is Duration which is where “data type is Numeric instead of expected Duration” is from. Have you tried creating this as a Numeric or Percent field type?

-ZF


Yeah, looks like the custom field needs to be numeric is all, should sort it. (the output of DateDiff is numeric)

 


Thank you so much @zfieldsgreystar and @Andy Johnston !

Indeed, all I had to do was to create a numeric custom field that “converts” the amount from the duration field that I want to use in the calculation into a numeric value; I used the formula ($BaselineDuration / Days(1) ) for this. 


Reply