> For the complete documentation index, see [llms.txt](https://endash-guidance-docs.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://endash-guidance-docs.gitbook.io/docs/dashboard/custom-formula-column.md).

# Custom formula column

## Overview

A **custom formula column** allows users a new column where each cell's value is dynamically calculated based on a formula. The formula can reference other columns, perform calculations, apply logical operations, or even use built-in functions.

#### Example:

If you have a dataset with columns "Price" and "Quantity", you could create a custom formula column called "Total Cost" that multiplies these two columns, with a formula like:

```mathematica
= {Price} * {Quantity}
```

## Open custom formula column pop-up

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2FpISX3NoUqMPos2jZc8AV%2Fimage.png?alt=media&amp;token=95d0c1b4-d8d6-46fc-af91-93763634a905" alt=""><figcaption></figcaption></figure>

* For Table, you can create a Fx column by clicking on the icon next to the last column.

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2FI98dKrTVJUcHpJLiwGPj%2Fimage.png?alt=media&amp;token=da30ceec-b250-4d17-89f4-c3946ed5d404" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2FXpBO6sbnfybhTEHI7nwv%2Fimage.png?alt=media&amp;token=55adc909-69f2-4759-bd8c-dece16f41c06" alt="" width="563"><figcaption></figcaption></figure>

* For other widgets, you can find the Fx icon when adding the column to create a widget.

## Create a custom formula column

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2FcLcGOvHrFsZI8Kb1B2js%2Fimage.png?alt=media&amp;token=3a860677-28d3-464b-8255-fccb18d888c8" alt=""><figcaption></figcaption></figure>

* You will be asked to fill in the Column name and the Formula

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2FwL3PnFFlA3R5numzGd0K%2Fimage.png?alt=media&amp;token=856b72f2-8d32-4a52-a272-9f3add1526db" alt=""><figcaption></figcaption></figure>

* Select the arrows next to Fields and Functions to browse and pick the desired column easily.

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2F10w9cYibJK1v7IgZbvjT%2Fimage.png?alt=media&amp;token=3c82dcb1-49c2-432f-835f-eef1b6ddcaa0" alt=""><figcaption></figcaption></figure>

* You can input directly into the Formula field to display results close to the result.

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2F7G28j7rZQN5O73LPUgwO%2Fimage.png?alt=media&amp;token=654db822-6dab-4bde-83cb-289d3d0a949b" alt=""><figcaption></figcaption></figure>

* Click the Save column button to finish the setup.
* Click the Discard button to go back to the previous state.&#x20;

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2FCDngZEA4TvTNUXoh24Hk%2Fimage.png?alt=media&amp;token=f85b4745-50da-46f5-8843-1b34775564f8" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can check at the bottom of the field to see if the Fx column is aggregated or analytic.
{% endhint %}

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2FRtO0yFy3DvHx0LlXBbTL%2Fimage.png?alt=media&amp;token=df5e00ac-0ac9-427a-aa8d-8dae55d37589" alt=""><figcaption></figcaption></figure>

* The newly create Fx column will be on the right side of the Table.

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2FsVP6AvcNqzkYc2A5B7MV%2Fimage.png?alt=media&amp;token=7f5b7b90-1466-41dd-b69e-a7b65c9a4b56" alt=""><figcaption></figcaption></figure>

* For other charts, you can select it on the list.

## Edit a custom formula column

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2FJAY09XvG1aWY2zxIG3ST%2Fimage.png?alt=media&amp;token=b27c0ca5-038d-46e8-b386-1495b98615c0" alt=""><figcaption></figcaption></figure>

* Click on the :pen\_fountain: icon of the Fx column.

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2F5kzPhohSUhNxeSr3r9uv%2Fimage.png?alt=media&amp;token=668ba96d-4138-46bd-9c51-a63f3ffe2720" alt="" width="563"><figcaption></figcaption></figure>

* Click on the Formula text.

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2FHiKXYLJ2OjJUNEZECGIe%2Fimage.png?alt=media&amp;token=f5d3e3ad-2710-4b47-b51d-a0d83c5f44b7" alt=""><figcaption></figcaption></figure>

* You can click directly on Properties to edit it.

{% hint style="info" %}
This column is local to the View and won’t impact the data model
{% endhint %}

{% hint style="warning" %}

* In pivot, aggregated/analytical columns can only be used in Values.
* In the vertical bar, the aggregated/analytical column can only be used for the Y-axis.
  {% endhint %}

## Delete a custom formula column

<figure><img src="https://1608311007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSr8m3Ldc2W7Qqq1jsjgC%2Fuploads%2FRzRt1OP5qUEnHfZbRgcg%2Fimage.png?alt=media&amp;token=b94038fe-8453-47f1-a857-fb474b1447b8" alt="" width="363"><figcaption></figcaption></figure>

* Simply click the Delete button in the Edit column to delete the Fx column.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://endash-guidance-docs.gitbook.io/docs/dashboard/custom-formula-column.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
