# Channel formulas

The **Channel Formulas Manager** enables organizations to create and manage formulas that convert raw sensor signals, such as **pulse counts**, **4–20 mA current**, **resistance** or **0–10 V voltage,** into meaningful measurement values (e.g., wind speed, flow rate, visitor count). This allows you to use virtually any type of analog or pulse-based sensor with Efento Cloud while preserving compatibility with platform features such as charts, alarms, reports, and webhooks.

The Channel Formulas Manager is located in the **Organization settings** and is available to users with **Administrator** or **Manager** permissions.

![](/files/a9e2b8c1d51ee1e4b84ac1f25a7bc115caf80805)

The main list shows all formulas created within the Organization, along with their names, access levels, and available actions. From this view, you can:

* **Add a new formula**
* **Review change history** (e.g., modifications, creator, date)
* **Edit an existing formula**
* **Delete a formula**, provided it is not in use
* **Check which sensors are using each formula**

![](/files/c7f5c43729dc1844648fe5eec0b1ee87ebaebf16)

## **Creating a new formula**

Creating a formula includes two stages: defining general properties and specifying conversion logic.

{% stepper %}
{% step %}

### **General settings**

When adding a new formula, you must:

* **Enter a unique formula name:**\
  Choose a clear name describing the transformation, such as *“Voltage to Pressure”*.
* **Define source and target types**\
  The source type specifies the type of data received from the sensor, while the target type determines the measurement type that will be produced after the formula is applied. Select both types from the list of available measurement types.

  If you need to use a measurement type that is not supported natively in Efento Cloud, [create a custom measurement type](/efento-cloud/advanced/organization-settings/custom-measurement-types.md#adding-a-new-measurement-type) first. Once created, it will appear in the list and can be selected as the target type for the formula.
* **Set the formula’s access level:**
  * **Private** – Only the creator can edit it.
  * **Public** – Any user with access to the Formula Manager can modify it.

![](/files/ec3c27862c0389c376a2c4972282ccda93ccaa58)
{% endstep %}

{% step %}

### **Defining logical conditions and conversion expressions**

Each formula is built from **one or more conditions**, allowing highly flexible transformations. A condition contains:

* A **logical range** specifying when the condition applies
* A **conversion formula** that transforms the raw sensor value

#### **Using mathematical expressions**

All formulas use **X** to represent the incoming sensor reading.\
Examples:

* Convert milliamps to temperature: `X * 12.5 - 25`
* Scale a voltage reading: `(X / 10) * 100`
* Convert a pulse count into liters based on a pulse factor: `X * 0.5`

Mathematical rules supported:

| Operator | Meaning        |
| -------- | -------------- |
| `+`      | Addition       |
| `-`      | Subtraction    |
| `*`      | Multiplication |
| `/`      | Division       |
| `( )`    | Grouping       |

Conversion expressions must be **valid equations** and no longer than **32 characters**.

After completing the condition and conversion formula, add the formula by pressing '**+**' in the **Actions** column, which will display the formula condition below, ready to be saved.

![](/files/6f879dd643cef1ddec228096be26be53f872ce9e)

#### **Building multi-condition formulas**

You can define multiple conditions within a single formula. For example:

* If X < 10 → apply `X * 2`
* If X = 10 → apply `X * 3`
* If X > 10 → apply `X * 4`

This supports advanced use cases such as:

* **Non-linear sensors**
* **Pulse counters with different ranges**
* **Sensors requiring multi-step calibration curves**

After entering a condition and formula, click **+** to add it to the list.\
Conditions are evaluated in order and the first matching condition is used. Each condition formula can be **edited** (pencil icon), **deleted** (trash bin icon), or **reordered** using the **up and down arrow** buttons to adjust its position in the list.

![](/files/9cdeae777c7e0e9204cb9a56078a2c00a7edb442)
{% endstep %}
{% endstepper %}

### **Assigning formulas to sensor channels**

Formulas can be assigned to sensors that provide **electrical or pulse-based outputs**, such as:

* 4–20 mA industrial sensors
* 0–10 V analog sensors
* Resistance sensors
* Pulse-output devices (e.g., flow meters, counters)

#### **Assigning formulas during device setup**

When adding a sensor to the platform:

1. Enter the **sensor name**
2. Enable **Channel redefinition**
3. Select the **target measurement type** for the selected sensor channel(s)
4. Choose an **existing formula**, or create a new one

![](/files/4cb330d99f092ec2a8b14c1c3ea86bc17421649c)

Once the sensor is added:

* You may change formulas **only within the same target measurement type**
* To change the target type, you must **remove and re-add the device**

This ensures data consistency and prevents accidental loss of measurement history.

### **Formula errors**

Efento Cloud automatically validates every converted measurement. If a problem occurs, the platform displays a **Channel error** message next to the sensor on the dashboard.

Possible causes include:

* **Division by zero**
* **Value outside the allowed measurement range** defined in the measurement type
* **Sensor reading does not match any condition**
* **Incorrect or invalid formula syntax**

To view details about the error, hover your cursor over the red **Formula error** indicator.

![](/files/3b3427d094519d6e15130b4ddaf38d62bfae5cab)


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.efento.io/efento-cloud/advanced/organization-settings/channel-formulas.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
