![]() | ![]() | ![]() |
When using a formula in SAS® Financial Management, the result of that formula might vary if the formula members are also the result of other formula calculations. This is due to calculation precedence in SAS Financial Management.
SAS Financial Management calculations are performed in the following order:
For example, assume you have a Modeling formula defined as
A = B * Cwhere the values for B and C are the result of the following:
B (Reporting formula Type)The formulas and their results are as follows:
C (Modeling formula Type)
B = 5 * 1; B = 5Before executing the query, the values for B and C are zero.
C = 20/2; C = 10
Although the expected result for A is 50 (10*5), the formula returns a zero value for A in the above case. This is because the calculation precedence in SAS Financial Management causes C and A to be calculated first (first C and then A). As a result, the formula
A = B * Cis calculated as
A = 0 * 10The value for B, a Reporting formula is not calculated until after the all the Modeling formulas are processed. Ultimately, you see the following results:
A = 0If the formula type of B is changed to Modeling or Driver, the calculation precedence would result in expected values returned for A in this example.
B = 5
C = 10
Please refer to the table below for a representation of how the formulas in the above example are processed.
A= B * C
------------------------------------------------------------------------------------------------- | | Value | Value | Value | | | | | | of A | of B | of C | Comment | Calculation | Result | ------------------------------------------------------------------------------------------------- | Initial | | | | | | | | state | 0 | 0 | 0 | | | | ----------------------------------------------------------------------------------------------- | Step 1 | 0 | 0 | 10 | Modeling formula on right side | | | | | | | | of equation calculated first | C = 20/2 | C = 10 | ------------------------------------------------------------------------------------------------- | Step 2 | 0 | 0 | 10 | Reporting formula on left side | A = B * C | | | | | | | of equation calculated next | A = 0 * 10 | A = 0 | ------------------------------------------------------------------------------------------------- | Step 3 | 0 | 5 | 10 | Modeling formula on right side | | | | | | | | of equation calculated next | B = 5 * 1 | B = 5 | ------------------------------------------------------------------------------------------------- | End | 0 | 5 | 10 | (A=B*C) reconciled after (C=20/2),| | | | state | | | | but prior to (B=5*1) | | | -------------------------------------------------------------------------------------------------
For more information about the use of SAS Financial Management formulas, refer to SAS Financial Management Formula Guide
| Product Family | Product | System | SAS Release | |
| Reported | Fixed* | |||
| SAS System | SAS Financial Management | Microsoft Windows Server 2003 Datacenter Edition | ||
| Microsoft Windows 2000 Professional | ||||
| Microsoft Windows 2000 Datacenter Server | ||||
| Microsoft Windows Server 2003 Enterprise Edition | ||||
| Microsoft Windows Server 2003 Standard Edition | ||||
| 64-bit Enabled AIX | ||||
| Microsoft Windows XP Professional | ||||
| Microsoft Windows 2000 Server | ||||
| Microsoft Windows 2000 Advanced Server | ||||
| 64-bit Enabled Solaris | ||||
| Type: | Usage Note |
| Priority: |
| Date Modified: | 2011-09-22 08:35:00 |
| Date Created: | 2008-02-15 09:37:03 |


