# Custom Formulas

<figure><img src="https://1366836623-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWOWjDH33JGp4Ay1omBCB%2Fuploads%2FdhKOzrNwEmHKC2jk7Stz%2Fcustom-formulas-2-ezgif.com-optimize.gif?alt=media&#x26;token=804c904b-7148-4890-afa0-838b7d3c9acb" alt=""><figcaption></figcaption></figure>

## What is a Custom Formula?

Custom Formulas are a powerful way to create custom calculations for each portfolio company using variables from:

* KPI metrics (such as Revenue, Cash Balance)
* Default [Tactyc Reporting Fields](https://docs.tactyc.io/portfolio-management/investments-table/investment-reporting-metrics) (such as Current MOIC, Invested to Date, Current Post-Money Valuation)

These variables can be combined into a custom formula (or "equation") to generate a new calculated variable. Some potential use case are calculating:

* Burn rates from collected cash balances
* Calculating revenue growth rates over the past X months or years
* Calculating revenue multiples such as **Current Post-Money Valuation / Latest Revenue**

## Creating Formula

### Step 1: Create Variables

* Go to **Formulas** from the sidebar
* Select a **Variable Type** (this could be either a KPI or a [Tactyc Reporting Field](https://docs.tactyc.io/portfolio-management/investments-table/investment-reporting-metrics))
* Specify a **Timeframe:**
  * If the variable is a KPI, you can set a timeframe for this KPI value:
    * **Reporting Type:** Whether to use Actual or Projected KPI value
    * **As Of**: The relative period in months from today for the KPI value. For e.g. if you want to use the Revenue from 12 months ago, this should be entered as 12
    * **Timeframe**: Whether the relative period is in the past or the future
  * If the variable is a Tactyc Reporting Field, by default the default timefrae value will be as of today
* **Variable Name**: The name of the variable to be used in the formula
* Click **Add Variable**
* Repeat the process for any other variables you intend to use in the formula

<figure><img src="https://1366836623-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWOWjDH33JGp4Ay1omBCB%2Fuploads%2FYQRay1YQvnJs9Af970Yo%2FScreenshot%202024-05-12%20at%2011.56.30%20AM.png?alt=media&#x26;token=b1af3cd5-d3a9-401c-a19c-72d4f43b0488" alt=""><figcaption></figcaption></figure>

### Step 2: Create Formula

Next, we need to create a formula using the available variables. Let's say we want to calculate the Revenue Growth Rate using the following formula:

```
Revenue Growth = Revenue Today  / Revenue 12 Months Ago - 1 
```

We've defined 2 different variables:

* Revenue Today
* Revenue 12 Months Ago

In the Formula Editor, we can then define the formula using curly braces for variables as follows:

<figure><img src="https://1366836623-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWOWjDH33JGp4Ay1omBCB%2Fuploads%2FSa2ZsEz2HRbEElJ7j66f%2FScreenshot%202024-05-12%20at%2010.42.09%20PM.png?alt=media&#x26;token=e279d94e-7e04-4edf-b55e-42e7604c3060" alt=""><figcaption></figcaption></figure>

* We've also specified the result format to be a percentage for the calculated growth rate
* Clicl **Calculate** to have Tactyc calculate the formula results

### Step 3: Calculation Results

If the formula and variables are valid, Tactyc will produce a downloadable table of the formula calculation for each portfolio company

<figure><img src="https://1366836623-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWOWjDH33JGp4Ay1omBCB%2Fuploads%2F0CVesQbMovtCv8XgFAOr%2FScreenshot%202024-05-12%20at%2012.05.22%20PM.png?alt=media&#x26;token=3b93ac7a-5696-462c-8e68-3c0f97ef7aed" alt=""><figcaption></figcaption></figure>

## Saving Formulas

To save this formula for easy reference in the future, click on **Save Formula** on the top right. You can either save the formula as a new formula with a custom name (such as "Revenue Growth")

<figure><img src="https://1366836623-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWOWjDH33JGp4Ay1omBCB%2Fuploads%2FOeo8i4OYiKfnrM819kOo%2FScreenshot%202024-05-12%20at%2012.09.00%20PM.png?alt=media&#x26;token=426fc9bb-a8aa-4466-bd19-287e72f3ea89" alt="" width="563"><figcaption></figcaption></figure>

## Loading Formulas

To load a saved formula from a prior session, click on **Saved Formulas** and **Load Formula** for the selected formula

<figure><img src="https://1366836623-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWOWjDH33JGp4Ay1omBCB%2Fuploads%2Fll9tYmNbgdcnv5t4LPDI%2FScreenshot%202024-05-12%20at%2012.13.17%20PM.png?alt=media&#x26;token=60e581cd-388a-419e-8e73-e696740abd0c" alt="" width="335"><figcaption></figcaption></figure>

{% hint style="info" %}
**Important: How Time Frames Work for Loaded Formulas?**<br>

If your formulas uses KPIs, these variables are *relative* in period. For example if you have defined a variable called *Revenue 12 Months Ago* that references the revenue from 12 months in the past, every time you run this formula, the value for this variable will reference the revenue figure from 12 months in the past.

**Why are KPI variables relative?**

The reason that KPI variables are relative instead of tying to a specific point in time is so that you don't have to constantly change your formula variables to update them. For example if you created a Revenue Growth Rate formula (such as the example above), every time you run this formula, it will always show the latest growth rate as of that point in time.<br>
{% endhint %}

## Coming Soon

We are working on exposing the results of this calculation process into other Tactyc reports (such as Tearsheets and Portfolio Summary). More to come here soon!
