Simple Calculation

S

Stacey

Hi!

I would love some help with adding a simple calculation to a custom field.
We would like to display Work Variance as a percentage. I have made a custom
field (tried with a task and project entities) with the formula [work] /
[baseline work] and the field comes up with "#ERROR". If I hit F9 to
calculate, each row says "42134". Thank you so much for your help! This
discussion board has been very helpful!

Stacey
 
D

Dale Howard [MVP]

Stacey --

You are using the wrong formula. Assuming you are using a Number field, the
simplest version of this formula is:

[Work Variance]/[Baseline Work]

The formula fails, however, if the user has not saved a Baseline for the
project. Therefore, you can test for the presence (or lack of) a Baseline
by rewriting the formula as:

IIF([Baseline Finish] = ProjDateValue("NA"), 0, [Work Variance]/[Baseline
Work])

If you use the above formula for tasks, the formula will fail for Milestone
tasks which have a Baseline Work value of 0h. This gives you a division by
zero error mathematically, so for tasks you could rewrite the formula as:

IIf([Baseline Finish] = ProjDateValue("NA"), 0 , IIf([Milestone], 0, [Work
Variance]/[Baseline Work]))

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top