1

I have a custom formula field where I need to calculate the amount of days in the year * 100 \ 365 = % of days remaining.

I've created the following formula:

ROUND((365 - (CloseDate - DATE(YEAR(CloseDate), 1, 1))) / 365, 2)

which is not giving me correct result.

Please advise what I need to change in the existing formula to be able to get

the amount of days in the year * 100 \ 365 = % of days remaining

Thank you in advance.

1 Answer 1

3

Your formula is correct, but you don't need the explicit ROUND() call. Just set your field to have the return type Percent, with two decimal places, and use your existing core formula:

(365 - (CloseDate - DATE(YEAR(CloseDate), 1, 1))) / 365

If you load an Opportunity with a Close Date of 2019-09-01 (September 1, the 244th day of 2019), you'll see 33.42% of the year remaining, which is correct:

(365 - (2019-01-01 - 2019-01-01)) / 365 = (365 - 243) / 365 = 0.3342 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .