Getting "Error" on Budget field

K

kwwatson

I am using the following formula for a budget stoplight indicator.


Switch([Baseline Start]>#12/31/2049#,"No baseline",[Cost]/[Baseline
Cost]>1.2,"Overbudget by 20% or more",[Cost]/[Baseline Cost]>1,"between

0-20% Overbudget",[Cost]/[Baseline Cost]=1,"on budget",True,"under
budget")


My graphical indicator is set to


equals No Baseline white circle


But after doing the calculation and republishing I get "error" where a
white circle should be.


Can anyone help?


Thanks
 
G

Gary L. Chefetz [MVP]

Kevin:

To accurately test for a date value in a field use:

[Baseline Finish]=projdatevalue("NA")

The other problem you face with your formula, is that you're not protecting
against a divide by zero error. You could very well have a baseline cost of
zero while having a baseline set, and therefore cause your formula to bomb
at any point at which baseline cost = zero.
 
M

Mike Glen

Hi kwwatson ,

Try posting on the server newsgroup as this one's closing down. Please see
FAQ Item: 24. Project Newsgroups. FAQs, companion products and other
useful Project information can be seen at this web address:
http://project.mvps.org/faqs.htm

Mike Glen
Project MVP
 
K

kwwatson

Gary,

Thanks for getting back with me, but I guess I do not understand.

I tried changing to what I thought you were suggesting but it did not
work.

Switch([Baseline Finish]=projdatevalue,("NA"),[Cost]/[Baseline
Cost]>1.2,"Overbudget by 20% or more",[Cost]/[Baseline Cost]>1,"between
0-20% Overbudget",[Cost]/[Baseline Cost]=1,"on budget",True,"under
budget")

I also see your point about the zero value but I am at a loss as to how
and correct it. Can you be more specific? Ideally I would like to be
able to cut and paste the proper formula in if that's not asking to
much.

Thanks,

Kevin
 
G

Gary L. Chefetz [MVP]

Kevin:

The first part of the formula is screwed up with an extra comma and you
didn't assign the result value for the test, such as "no baseline".

Switch([Baseline Finish]=projdatevalue("NA"),"No Baseline",.....

Add a test for 0 baseline cost value to avoid dividing by zero

[Baseline Cost]=0,"No Cost",

BTW, you could use tests against [Cost Variance] instead of calculating your
own index.
 

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