Administering : Managing business rules and expressions : Operators of expressions : Writing expressions: Advanced examples
  
Writing expressions: Advanced examples
Calculating Net Present Value
Net Present Value (NPV) is an approach used in capital budgeting where the present value of cash inflow is subtracted from the present value of cash outflows. You can use NPV to compare the value of a dollar today to the value of that same dollar in the future after taking inflation and return into account. If the NPV of a prospective investment is positive, accept it. If the NPV is negative, cash flows are negative, so you might consider rejecting the project.
With expressions, Focal Point automatically calculates NPV and alerts you if an investment can be rejected because it is not profitable.
Prerequisites
All projects must be entered in a module.
All projects must have cash flow values entered for the current date and a future date; for example, for four years ahead.
All projects must have their Opportunity Cost of Capital entered.
Example of NPV data
 
Project name
Opportunity cost of capital
CF today
CF Year 1
CF Year 2
CF Year 3
CF Year 4
A
6
-200
0
0
220
220
B
6
-200
100
100
100
100
To calculate the NPV for a project
1 Add a Float attribute named NPV, and then specify it as default value:
=-'CF today' + 'CF Year 1'/(1+'Opportunity Cost of Capital') +
'CF Year 2'/(1+'Opportunity Cost of Capital')**2 +
'CF Year 3'/(1+'Opportunity Cost of Capital')**3 +
'CF Year 4'/(1+'Opportunity Cost of Capital')**4
2 Create a view with this rule:
All elements in the project module whose type is
a folder is false and NPV is less than 0
3 Add this view to your home page, and then name the window:
"Alert! Maybe you should drop these projects:"
You can also change the Opportunity Cost of Capital attribute for all of the projects to point to the top folder Opportunity Cost of Capital by typing this expression (use multi-edit):
='Projects!Opportunity Cost of Capital'
Now you need to change only Opportunity Cost of Capital for the top folder, and that attribute will be updated automatically for the projects.
Setting alerts for accelerating costs
You can set Focal Point to alert you when requirements are becoming too expensive.
Prerequisites
All requirements must have their estimated time for implementation entered (Estimated Time)
All requirements must be continuously updated with time spent (Actual Time)
To create an alert about accelerating costs
1 Add an Integer attribute named Alert; as default value, enter this text:
=('Actual Time'*1.1>'Estimated Time')?1:0
2 Create a view with the following view rule:
"All elements in the requirement module whose
type is a folder is false and Alert is 1"
3 Add the view to your home page and name the window:
"Alert! Requirements 10% over budgeted cost:"
Go up to
Operators of expressions