Using custom formulas is another way to get a total cost price. Custom formulas allow you to create your own complex or simple custom formulas through pricing terms.

- This information can be pulled from questions asked and other pricing terms placed within the sourcing event.
- Template must allow the Project Manager to create custom formulas.

### Setting Up Custom Formulas

When adding formulas, the formula editor presents a list of other content elements that are available for use within the formula. The content that is available depends on where the formula is and where and how the other content was defined.

A formula can be placed:

- At the top level of the event. To add a formula at the top level, make sure no boxes are checked and choose
**Add Formula**. - In a section that is at the top level (but not in a section within a lot).
- In a line item.
For a question to be available for use in a formula, "Answer type" has to be a numerical value. To map text (or yes/no, or a date) to a numerical value, you have to specify that the term be included in the cost as Custom.

### Simple and Complex Formulas

A formula can include the Price, Quantity, Extended Price, Savings, and Installation Time (in hours) terms, and uses common mathematical operators and parentheses for grouping. The formula calculations can be either simple or complex.

- A
**simple**formula would look like**‘Price’*’Quantity’**or**(‘Price’+’InstallationFee’)*’Quantity’** - A more
**complex**formula may summate the total cost by finding the price times the quantity, plus the installation time times the hourly labor rate times the quantity:**‘Price’*’Quantity’+’Installation_Time_(in_hours)’*’Event.What_is_your_hourly_labor_rate?’*’Quantity’**

### Functions

The formula engine supports **functions** to act as an expression between term variables. Expressions can be in all caps, all lower case, or Initial cap format, such as TOTALCOST, totalcost, or TotalCost

The available functions when creating formulas:

- Absolute Value (ABS)
- Aggregate Costs (AGGREGATECOSTS)
- Current Maximum Value (CurrentMaxValue) and Current Minimum Value (CurrentMinValue)
- Earnings over Historic Value (EARNINGS)
- If-Then Construct (IF)
- Maximum Value (MAX) and Minimum Value (MIN)
- Rollup (EXTENDEDPRICE)
- Savings from Historic Value (SAVINGS)
- Total Cost (TOTALCOST)

Function syntax details for the above list can be located in Event Management documentation.

### Formula Demonstration

Play the video below to see how to set up custom formulas.