# Add Formula Column

PowerTable has a built-in formula engine that can perform calculations on your data. Formula columns are calculated columns created from your data that enable you to derive business-specific metrics or calculations on the go. You can add them at the visual level or directly to your source database.

1. To insert formula columns, go to **Setup > Columns.**

<figure><img src="https://1781349671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKyXRCFh0c08ryiUFvyMV%2Fuploads%2FA6YxIAqb1N2YBAztLXWr%2Fimage.png?alt=media&#x26;token=1f4af3ea-7fde-4d41-9fe2-c8d6c992491e" alt=""><figcaption><p>Setup > Columns</p></figcaption></figure>

2. Select **Add Visual Column > Add Formula Column.**

<figure><img src="https://1781349671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKyXRCFh0c08ryiUFvyMV%2Fuploads%2Ft8APCLX6FGeM92Wq4shL%2Fimage.png?alt=media&#x26;token=f218c84c-1dbd-47dd-97ba-72ecd9b9f5c0" alt=""><figcaption><p>Add Formula Column</p></figcaption></figure>

You can also insert a formula column as shown below:

<figure><img src="https://1781349671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKyXRCFh0c08ryiUFvyMV%2Fuploads%2FAiBa3OBjHFDEYxhXOJEs%2Fimage.png?alt=media&#x26;token=4e26a5e5-b0e8-4e28-a46a-0cf4f30c47f5" alt=""><figcaption></figcaption></figure>

3. Configure the formula column by entering the column name and required formula, then click **Save**.

<figure><img src="https://1781349671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKyXRCFh0c08ryiUFvyMV%2Fuploads%2FHwuaQTG4Gl2ReD2Vzrp4%2Fimage.png?alt=media&#x26;token=486e3d9b-c06c-4ad2-a5ba-acc1275210d1" alt=""><figcaption><p>Configuring a formula column</p></figcaption></figure>

* You can create a formula column directly in the database by selecting the checkbox labeled "**Create a database column**."
* Select the appropriate data type for the column. The formula column will be added to the source database.

<figure><img src="https://1781349671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKyXRCFh0c08ryiUFvyMV%2Fuploads%2F1dQjbnszXoN47N0CBLn2%2Fimage.png?alt=media&#x26;token=076c6c6b-8e44-4696-806f-3915b73ec175" alt=""><figcaption><p>Creating a formula column in the database</p></figcaption></figure>

The formula column has now been added successfully.

<figure><img src="https://1781349671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKyXRCFh0c08ryiUFvyMV%2Fuploads%2FNJ9XSR23LIS0tpbISVoi%2Fimage.png?alt=media&#x26;token=40dda4ed-ce06-440c-976e-afa7f7211367" alt=""><figcaption><p>Formula column added</p></figcaption></figure>

Formula columns cannot be edited directly because their values are based on an underlying formula.&#x20;

For more information about formulas and functions, you can refer to [this section.](https://docs.powertable.com/explore-powertable/formulas-and-functions)
