Use Formulas to calculate metrics important for you.

Formula is a Field, and it means you can do the same things with Formula Field as with all other fields. For example, you can display Formula Field on entity card, filter and sort by Formula Field, use it inside Charts.

To create a formula, navigate to any Type and click Add Field or Relation, then select Formula.

You will see Formula field creation form. In this form you should specify Field Name and Formula itself. Field Type will be guessed automatically, but you can correct it. For example, for Number you may select Decimal or Integer.

Formula setup can be challenging, so let’s explore some examples based on the following domain:

Here we have Product with a collection of Epics, and Epic has a collection of Features. Let’s say, we have Effort field in Feature and want to calculate Total Effort inside Epic. The formula will look like that:

`Features.Sum(Effort)`

Now we want to add Total Effort Field into Product entity to roll-up all Epics. Here is how you do it

`Epics.Sum([Total Effort])`

## More examples

Inside Epic we want to calculate effort of all **completed** Features. We create **Completed Effort** Formula Field:

`Features.Filter(State.Final = true).Sum(Estimate)`

Now we can specify **Epic Progress** Field like this:

`[Completed Effort] / [Total Effort] * 100`

Text field that indicates **importance**

If((Confidence > 10) and (Reach > 10),"Important","So-so")

**Cycle Time**

`If([Planned Dates].End > Today(), ToDays(Today() - [Planned Dates].Start), ToDays([Planned Dates].End - [Planned Dates].Start))`