Can anyone tell me why this formula won't work? Tr...
# general
m
Can anyone tell me why this formula won't work? Trying to get an annual value for a subscription. I can replace the total amount with a number and get a calculation, but as soon as I reference a field I get the unexpected error. {total}/((ROUND(({enddate}-{startdate})/30.41))/12)
e
Try each part of the formula to identify which part is causing issues. i.e. Make a column of Formula(Number) for "ROUND(({enddate}-{startdate})/30.41)" If that doesn't throw errors, add on another part of the formula until you get the error. Then you can figure out which part is causing the issue
Or maybe even start with just {enddate}-{startdate}
m
((ROUND(({enddate}-{startdate})/30.41))/12) works, {total}+((ROUND(({enddate}-{startdate})/30.41))/12) works, {total}-((ROUND(({enddate}-{startdate})/30.41))/12) works, {total}*((ROUND(({enddate}-{startdate})/30.41))/12) works, but {total}/((ROUND(({enddate}-{startdate})/30.41))/12) breaks it. I didnt know if there is some other way to put it in the formula when every other combo works.
e
Guessing here- maybe throw one more set of parenthesis around the entire thing? ({total}/((ROUND(({enddate}-{startdate})/30.41))/12))
b
make sure you dont divide by 0