---
updatedAt: 2025-09-24T21:00:22.000Z
agentTools:
  projectIndex: https://docs.quable.com/v5-EN/llms.txt
---

# Calculated Attributes

This page guides you through setting up calculated attributes, allowing you to automate the generation of content from formulas.

> 📘 Guidance
>
> To get support in setting up this feature, please contact your integration partner.

# Overview

**Calculated attributes** are dynamically generated from a formula. They can be used on product sheets.

A calculated attribute:

* Is identified by a **sigma symbol Σ**,
* Is **non-localized** and **non-editable**,

***

<br />

# Setting Up a Calculated Attribute

Calculated attributes can be accessed from the **Attributes** page in the Administration menu.

<Image align="center" width="20%" src="https://files.readme.io/312e8c8b6964fc74bb17286c8a9c9d45b957f99a5009552bb5d88eca208ac3db-Capture_decran_2025-04-15_a_14.36.42.png" />

<br />

To create a **calculated attribute**, select a **document** object type and a **document type**:

* Click the lowest level of the hierarchy where you want to create the new attribute,
* Click the **Add an attribute** button,
* Fill in the following information:

  * **Name** (non-localized)
  * **Code**
* Select the **Calculated** type.

<Image align="center" width="50%" src="https://files.readme.io/4c7bf0da922d7b2b0c247ef339594edcaf8c937efc12e2871bc92600595391f5-Capture_decran_2025-04-15_a_14.37.12.png" />

<br />

***

<br />

# Entering a Formula

The result of a calculated attribute is based on the formula defined in the **Formula** field.

In a formula, attributes are called by their code.

A formula consists of:

* the codes of its source attributes,
* mathematical operators (+, -, \*, /),
* functions:

  * roundup() -> Round away from 0,
  * rounddown() -> Round towards 0,
  * ceiling() -> Round to the highest value,
  * average() -> average,
  * concat() -> concatenation,
  * condition ? value if true : value if false.

> 📘 Good to know
>
> * For this first version: the result of a calculated attribute is **always text type**.
> * In a formula, an attribute code is always **wrapped in two consecutive colons ::**

> 🚧 Limitations
>
> The formula cannot include:
>
> * another calculated attribute. If needed, copy the full formula from that attribute instead of using its code.
> * a localized attribute,
> * an html or json attribute,

> ❗️ Error Handling
>
> * If the formula is invalid, creation is blocked and an error message is displayed.
> * If a source attribute is empty or invalid (e.g., division by zero), an error appears on the product page with the cause specified.

<br />

## Examples of Calculated Attribute Formulas

* **Text concatenation:**

**Goal**: concatenate the text values of attributes, separated by a space.

<div style={{ display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(300px, 1fr))", gap: "20px", alignItems: "start" }}><div>

| Attribute Code | Value  |
| :------------- | :----- |
| attr\_code\_A  | Hello  |
| attr\_code\_B  | World  |
| attr\_code\_C  | Quable |

</div><div>

**Formula:** concat(::attr\_code\_A::," ",::attr\_code\_B::," ",::attr\_code\_C::)

**Result:** Hello World Quable

</div></div>

* **Average of values:**

**Goal**: calculate the average of attribute values.

<div style={{ display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(300px, 1fr))", gap: "20px", alignItems: "start" }}><div>

| Attribute Code | Value |
| :------------- | :---- |
| attr\_code\_A  | 3     |
| attr\_code\_B  | 4.14  |
| attr\_code\_C  | 1     |

</div><div>

**Formula:** average(::attr\_code\_A::,::attr\_code\_B::,::attr\_code\_C::)

**Result:** 2.713

</div></div>

* **Sum of values:**

**Goal**: calculate the sum of attribute values.

<div style={{ display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(300px, 1fr))", gap: "20px", alignItems: "start" }}><div>

| Attribute Code | Value |
| :------------- | :---- |
| attr\_code\_A  | 3     |
| attr\_code\_B  | 4.14  |
| attr\_code\_C  | 1     |

</div><div>

**Formula:** ::attr\_code\_A::+::attr\_code\_B::+::attr\_code\_C::

**Result:** 8.14

</div></div>

* **Conditions:**

**Goal**: If the attribute is <0, display A. If the attribute is <2, display B. If the attribute is <10, display C. If the attribute is <18, display D. Otherwise, display E.

<div style={{ display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(300px, 1fr))", gap: "20px", alignItems: "start" }}><div>

| Attribute Code | Value |
| :------------- | :---- |
| attr\_code\_A  | 3     |

</div><div>

**Formula:** ::attr\_code\_A:: < 0 ? "A" : ( ::attr\_code\_A:: <= 2 ? "B" : ( ::attr\_code\_A:: <= 10 ? "C" : (::attr\_code\_A:: <= 18 ? "D" : "E" ) ) )

**Result:** C

</div></div>

<br />

## Automatic Calculation

A calculated attribute is updated when:

* One of the formula’s source values is modified,
* The formula itself is modified,

> 🚧 Limitations
>
> * All attributes used in the formula must be populated for the calculation to succeed.
> * A calculated attribute cannot be imported into a data model, nor updated via the API. Formula creation and editing must be done via the front-end interface only.
> * A calculated attribute cannot be made **mandatory** or enriched directly from a product sheet.
>
> <Image align="center" width="50%" src="https://files.readme.io/be28daedf324cae6c7504b4d721c2a77de133e23b0d040a3586d113521174269-Capture_decran_2025-04-15_a_14.38.03.png" />
>
> * It is not possible to **delete an attribute** that is used in one or more formulas. You must first manually remove it from all relevant formulas.

## Apply the Settings

Once all settings are configured, click the “Add” button to save all changes.

<Image align="center" width="20%" src="https://files.readme.io/46bd7ad096551402e3462f92b10cad94975d71bf4ad9e8c09a3553052d8c1ecd-Capture_decran_2025-04-15_a_14.38.08.png" />

***

<br />

# Best Practices

* Document your formulas in the help field to facilitate maintenance, making it visible via the **help text**.

<Image align="center" width="50%" src="https://files.readme.io/7ddefb196b72d3ed243a1ad83fb6ba210102dff1c413c3d884c7ae0b7edf71eb-Capture_decran_2025-04-15_a_14.40.37.png" />

<br />

* Result on the product sheet:

<Image align="center" width="50%" src="https://files.readme.io/1a3a64a6cefeeb59af1bb95adac4b454e2c4a3c9305831fa8e236fd856045130-bestpratctice.gif" />