Calculate sum of categories
I have several category field that represent days, and the choices are numbers. For example: Sunday. 1; 2; 3; 4; Monday. 2; 4; 6; 8; And so on... I want to calculate the sum of the choices (2+6=8 in the example above): Calculation. @Sunday+@Monday+... The problem is the category field is a string, so I can't even assign it to a var. Any suggestions?

  • Hi Assaf,  sure this can be done:  moment(@release date).subtract(@procject duration,"days").toDate() Rainer
  • Thanks Rainer, it works great! One more step further, if I may: Let's call the calculation above "Project duration" and it's measured in days. I have two date fields "Release date" and "Start date". The release date is a given and start date is calculated by taking the result from above (in days) and subtracting it from the release date: Start date = @Release date - @Project duration. Is it possible to do that?
  • Hi Assaf, my suggestion:  var sun = Number(@sunday)var mon = Number(@monday)sun + mon Try it in fresh calculation field, cause your existing one maybe is text type (which you can't change once the template has been saved). Rainer  
This question is closed.