# Record Level Formula

<details>

<summary>How to access the Formula Field option?</summary>

The users can access the icon to of the Create Calculated Fields  from the ***right-side panel** of the **Design page***.

</details>

{% hint style="info" %}
*<mark style="color:green;">Please Note:</mark> The user can set the database settings using the* [***Data Store Settings*** ](https://docs.bdb.ai/administrative-settings-3/admin-panel-options/configurations/data-store-settings)*option provided under the **Configuration** part of the **Administration** module.*
{% endhint %}

{% hint style="success" %}
*Check out the given walk-through on creating a formula field at the record level.*
{% endhint %}

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxZF8YGlESz97qqyTOJvz%2Fuploads%2FDc5IKwiWG59ft5Ey4PDS%2FCreating%20a%20Dimension%20using%20Formula%20at%20Record%20level.mp4?alt=media&token=e126c74d-016e-4048-8ad3-031610790d88>" %}
Creating a Dimension using the Record Level Formula Functionality
{% endembed %}

* Navigate to the ***Design*** tab after selecting a Data Store to design a new view.
* Click the ***Create Calculated field icon.***

<figure><img src="https://3555642236-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxZF8YGlESz97qqyTOJvz%2Fuploads%2FU4pnKCTtlaQd4lkCiY3m%2Fimage.png?alt=media&#x26;token=b0ff64cc-a845-4ff3-960d-2735bb0a1748" alt=""><figcaption><p><em><strong>Accessing the Create Calculated Field option on the Design page</strong></em></p></figcaption></figure>

* The user gets redirected to the ***Create*** ***Calculated Field*** window.
* Please navigate to the ***FORMULA*** tab (It opens by default).
* **Formula Name**: Give a title to the formula field.
* **Level**: The user can create the calculated field at two levels.
  * Record Level
  * Summary Level
* **Type**: Select an option from the drop-down menu to decide the kind of the Formula Field.
  * Dimension
  * Measure
* **Fields**: All fields from the selected Data Store list are in this window. The users can select the required fields by tapping on them.
* **Functions**: All the available functions are listed in this window. The users can select the required functions to apply them to the chosen field.
* ***Formula Expression***: Based on the selected combination of Fields with Operators or Functions the Formula Expression is entered in this space.
* Click the ***Save*** option to save the formula field or calculated field.

<figure><img src="https://3555642236-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxZF8YGlESz97qqyTOJvz%2Fuploads%2FKEVYdwZ78JCINh3XHbiz%2Fimage.png?alt=media&#x26;token=9a80cd7d-1108-436a-b8f6-9ff49ec456bc" alt=""><figcaption><p><em><strong>Creating a Formula Expression</strong></em></p></figcaption></figure>

{% hint style="info" %}
*<mark style="color:green;">Please Note:</mark> The users can select the required operator to add and complete the formula for a Measure column.*&#x20;
{% endhint %}

* A notification message appears to ensure that the ***Formula Field*** gets created.

<figure><img src="https://3555642236-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxZF8YGlESz97qqyTOJvz%2Fuploads%2FNvvAQaSxuDBvsgwjdnPb%2Fimage.png?alt=media&#x26;token=82071548-9fcf-436e-afed-0de5c20e7aa2" alt=""><figcaption></figcaption></figure>

* The newly created formula field gets added to the selected Data Store.
* Select the formula column name to get it in the top panel.
* Click the ***GO*** option.
* The column data is displayed in the Upper case.
* Click the ***Save View*** icon to save the View to the Report.

<figure><img src="https://3555642236-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxZF8YGlESz97qqyTOJvz%2Fuploads%2F9mNHCsfFQeMgCiypXsKd%2Fimage.png?alt=media&#x26;token=1bb8d6b7-314e-47e7-8fdb-48b498be0c18" alt=""><figcaption></figcaption></figure>

* A notification appears and the user gets redirected to the final screen of the Report with the View added to it.

<figure><img src="https://3555642236-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxZF8YGlESz97qqyTOJvz%2Fuploads%2FoP3J44olt7szWgMji3b1%2Fimage.png?alt=media&#x26;token=3b9d7468-3da1-4984-896e-92a1858b1342" alt=""><figcaption></figcaption></figure>

### Creating a Calculated Fields as Measure

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxZF8YGlESz97qqyTOJvz%2Fuploads%2FyhjGDtppisdKprD6heSJ%2FMeasure%20as%20calculation%20field.mp4?alt=media&token=dd2d60fc-c827-4abd-a2fa-30f314092d0b>" %}
*Measure as Calculation Field*
{% endembed %}

{% hint style="info" %}
*<mark style="color:green;">Please Note:</mark>*&#x20;

* *The Formula Fields created with the **Record Level** option can be saved as either **Dimension** or **Measure**. Based on the selected option for the **Type**, the displayed **Fields** may vary in the right-side panel.*
* *Double click on the **Functions** or **Operators** from the Formula Field Editor where the MongoDB server is configured in the **Admin Settings** as it generates one expression. The **tan** function does not support the **MongoDB** server.*
  {% endhint %}
