Managing products and portfolios : Financial planning using time grid attribute : Calculating financial information by using business rules : Calculating the sum of a time grid row
  
Calculating the sum of a time grid row
You can use the SumTimeGridRow business rule to calculate the sum of a time grid row in a given time span. The result is displayed in the business rule container attribute. If the values in the row change, the sum is automatically updated. The cells to be included in the calculation must either be date or attribute, and not a mix of both.
Before you begin
To use the SumTimeGridRow business rule, you need the following information:
The names of the time grid attribute, sheet, and row to calculate the sum for.
The start date and end date, either as references to attributes containing start and end dates, or on the format "YYYY-MM-DD". If you do not specify a start or stop date, the entire row is used.
Procedure
1 Create an integer attribute.
2 In the integer attribute, enter your business rule in the following format:
=SumTimeGridRow('Time Grid Attribute Name',"Time Grid Attribute Name", "Sheet Name", "Row Name")
3 Click Save.
Results
The sum of the time grid row is calculated as a decimal number, and displayed in the integer attribute.
SumTimeGridRow is calculated as a decimal. To display the sum as a decimal, enter the business rule in a float attribute instead.
SumTimeGridRow business rule is not supported in the link aggregate time grid.
Example
From the Financial time grid attribute, you can calculate the sum of the Expenditures row in the Budget sheet. The calculation starts in cell A1 for the period that is specified in the Start Date and End Date attributes in the Phoenix element in the Projects module:
=SumTimeGridRow('Financials', "Financials", "Budget", "Expenditures", 'Projects!Phoenix!Start Date', 'Projects!Phoenix!End Date')
If the Start Date and End Date attributes are in the same element as the time grid attribute, type the references as Start Date and End Date.
The cells to be included in the calculation must either be a date or an attribute, and not a mix of both. For example:
Correct format:
=SumTimeGridRow('Application Costs',
"Application Costs","Planned","Total Costs",
"2009-01-01","2013-12-31")=SumTimeGridRow('Application Costs',
"Application Costs","Planned","Total Costs",
'Start Date',End Date')
Incorrect format:
=SumTimeGridRow('Application Costs',
"Application Costs","Planned","Total Costs",
"2009-01-01",'End Date')=SumTimeGridRow('Application Costs',
"Application Costs","Planned","Total Costs",
'Start Date',"2013-12-31")
Use the sum of the costs in a project to calculate the total project costs in a portfolio.
Go up to
Calculating financial information by using business rules