# Formula custom fields

Modified on Mon, 22 Jul at 10:15 AM

**Available on Asana Advanced, Enterprise and Enterprise+ tiers, as well as legacy tiers Business and Legacy Enterprise.**

With formula custom fields, you can perform calculations directly in Asana, making managing data easier and significantly enhancing your productivity.

Some examples of when you can use formula custom fields are:

Example | Formula |

Capacity management | Effort = [Quantity of weeks] * [Allocation] |

Time to complete | [Completed at] – [Created at] |

Time/amount overdue | [Completed at] – [Due date] |

Billing | [Amount per hour] * [Total hours] |

Estimated hours | ([Due Date] – [Start Date]) * [Hrs per week] |

Burn rate | ([Starting Balance] – [Ending Balance]) / [Number of months] |

Prioritization | ([Weight] * [Input]) + ([Weight] * [Input]) |

You can add these new formula custom fields to your domain’s global custom field library.

## Functions

Function | Definition | Syntax | Examples | Available in |

Add | Add two values | Add(value1, value2) Add([value], number) [value1] + [value2] [value] + number | Add([BudgetA], [BudgetB]) Add([Subtotal], 3) [BudgetA] + [BudgetB] [Subtotal] + 3 | Basic |

Subtract | Subtract two values | Subtract(value1, value2) [value1] - [value2] | Subtract(Budget, Spend) Subtract(Due date, Start date) [Budget] - [Spend] [Due date] - [Start date] | Basic |

Multiply | Multiply two values | Multiply(value1, value2) [value1] x [value2] | Multiply(Hours, Rate) [Hours] * [Rate] | Basic |

Divide | Divide two values | Divide(value1, value2) [value1] / [value2] | Divide(Remaining, Total) [Remaining] / [Total] | Basic |

DateAdd | Add days to a date | DateAdd(date, number) | DateAdd([Due date], 3) | Advanced |

DateSubtract | Subtract days to a date | DateSubtract(date, number) | DateSubtract([Due date], 3) | Advanced |

## Adding basic formula custom fields

By leveraging the add, subtract, multiply, and divide operators, you can perform a wide range of calculations within Asana and gather powerful insights about your work. Use these formulas to efficiently manage numerical data when creating budgets, analyzing sales figures, calculating capacity, and many more scenarios.

#### To add a formula custom field:

- You can add a formula custom field from the
**Customize**menu or by clicking**+Add field**on the column header - Select
**Formula**as the field type - In the
**Formula builder**, you can use any existing numerical custom fields - Choose from
**Add**,**Subtract**,**Multiply**, or**Divide** - Click
**Create field**

Here, the Event manager wanted to compare resources. To do so, they calculated the difference between the budget and what they spent, so they created the **Difference** formula custom field. The formula they used in the formula builder was **Budget minus (-) Spend**.

Another example of when you can use a formula custom field is when you’re trying to calculate your team’s capacity.

Here, the Event manager calculated the difference between the **Estimated time** and the **Actual time** for each task to see which task took more or less time than expected. The formula they used in the formula builder was **Estimated time minus (-) Actual time**.

Other examples of when you can use formula custom fields are:

- Capacity management: Quantity of weeks times (x) Allocation = Effort
- Time to complete: Completed at minus (-) Created at
- Time/amount overdue: Completed at minus (-) Due date
- Billing: Amount per hour times (x) Total hours (by person)

You can add these new formula custom fields to your domain’s global custom field library.

## Adding advanced formula custom fields

With advanced formula custom fields, you can create more complex formulas with more than one operator.

#### To add an advanced formula custom field:

- Add a formula custom field from the
**Customize**menu or by clicking**+Add field**on the column header - Select
**Formula**as the field type - In the
**Formula builder**, click**Switch to advanced mode** - From here, you can start typing a function or field or select them from the
**Functions**and**Fields**menu

## Formula chaining

With formula chaining, you can use existing formula custom fields as inputs to another formula you're creating.

For example, if you have an existing formula that's calculating **Budget Remaining,** you can use this value to build another formula (i.e. Burn Rate = Budget Remaining / Total Budget).

### Error messages and limits

- Both fields must be the same type. If you're using a numeric based formula, other inputs must be numeric based too.
- Date fields can only be subtracted.
- You can use up to 10 existing formula custom fields as inputs to a new formula.
- You can create up to two layers of formulas when creating a new formula:
- Valid: Formula 1 = Custom field A + Custom field B
- Valid: Formula 2 = Formula 1 / Custom field C (1st layer)
- Valid: Formula 3 = Formula 2 * Formula 1 (2nd layer)
- Not possible: Formula 4 =
**Formula 3*** Formula 1

- Formula custom fields that are shared globally with your domain can only use other shared formula custom fields as inputs. Keep in mind that adding a global formula custom field will also add formula input fields to your project as well (you can have up to 100 custom fields in a single project).
- A formula that contains another formula cannot be dependent on itself. For example, if
**Formula C**= (Formula A) + (Formula B), you won't be able to use**Formula C**as input to Formula A or B.

## Sorting numeric custom fields

You can sort your formula custom fields by ascending or descending.

#### To sort:

- Click
**Sort** - Select the custom field you want to sort by
- Select
**Ascending**or**Descending** - Click
**Apply** - You can also click on the drop-down next to the custom field to sort

## Reporting on formula custom fields

Use formula custom fields when creating charts to visualize data.

#### To create a chart using formula custom fields:

- Navigate to the
**Dashboard**tab - Click
**+Add chart** - On the
**Y-axis**, select the formula custom field - Click
**Create**

Learn more on how to create charts with our Reporting Help Center article.

## Using formula custom fields as effort in workload

You can use formula custom fields as the effort when creating universal or portfolio workloads.

## Using formulas in portfolios

Portfolios allow you to oversee multiple projects and gain a comprehensive view of your organization's initiatives. By incorporating formula custom fields into portfolios, you can perform calculations, track key metrics, and generate insights across various projects. Formula custom fields enable you to enhance decision-making, optimize resource allocation, and gain a holistic understanding of your portfolio.

Add a basic or advanced formula custom field to your portfolios through the **+** button or **Customize** menu.

## Using formulas in bundles

Bundles are powerful tools for standardizing processes and ensuring consistency across multiple projects. By incorporating formula custom fields within bundles, you can perform calculations and track key metrics specific to your standardized processes.

#### To add a global formula to a bundle:

- From the
**Customize**menu, navigate to bundles - Choose the bundle you want to edit
- Click
**Edit** - Scroll down to
**Fields**and click**+Add custom field** - From here, you can create a new formula custom field or choose an existing global formula custom field from the library
- Click
**Continue**and then**Apply changes**

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Feedback sent

We appreciate your effort and will try to fix the article