Skip to main content
Solved

Calculations based on timelines

  • March 19, 2024
  • 3 replies
  • 89 views

Forum|alt.badge.img+3

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.

Best answer by zfieldsgreystar

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

This topic has been closed for replies.

3 replies

zfieldsgreystar
Bronze Active Participant
Forum|alt.badge.img
  • Bronze Active Participant
  • Answer
  • March 19, 2024

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


Andy Johnston
Gold Active Participant
Forum|alt.badge.img+1
  • Gold Active Participant
  • March 19, 2024

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

 


Forum|alt.badge.img+3
  • Author
  • Gold Active Participant
  • March 19, 2024

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.