Expand my Community achievements bar.

Don't miss out on our March Adobe Workfront events!
SOLVED

rounding negative values

Avatar

Level 7

I need help with a calculation, and I'm sure I'm missing something obvious.

I have a calculated field to determine the difference between a custom date field and the project planned completion date: 

WEEKDAYDIFF({plannedCompletionDate}, (ADDWEEKDAYS({DE:First Offer Date},-15))).

I included the field in a report and added conditional formatting for it (>=0 [Green]; >=-5 [Yellow]; <-5 [Red]).  This works fine.

Then I wanted to try to account for holiday exceptions in our schedule.  I added a calculated column in the report (I wanted to try it out here before changing my calculated field):
 
valueexpression=ROUND(WORKMINUTESDIFF({plannedCompletionDate}, (ADDWEEKDAYS({DE:First Offer Date},-15)))/480).
 
The underlying calculation works; however, rounding the calculation results in positive values.  How can I round the result and still maintain any negative values?
 
KristenS_WF_0-1740076743600.png

 

Thanks.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Unless I miss my guess, "workminutesdiff" will never give you a negative result. If you want to use it, my guess is that you should find some way to artificially place one outside of the workminutes part of the equation (i.e. if first offer date minus 15 is > planned completion date, "-", then the workminutes calculation).

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Unless I miss my guess, "workminutesdiff" will never give you a negative result. If you want to use it, my guess is that you should find some way to artificially place one outside of the workminutes part of the equation (i.e. if first offer date minus 15 is > planned completion date, "-", then the workminutes calculation).

Avatar

Level 7

Ah... good point (didn't think about that).

Pity the WEEKDAYDIFF function doesn't incorporate the default schedule (with exceptions) like WORKMINUTESDIFF does.

Thanks!