## How does it work?

Create single-component formulas and override existing formula settings directly on a dashboard widget.

💡 Creating formulas on widgets is easier than using the formula editor, and they will be saved and stored just like all the other formulas in Plecto.

💡 It also means that conditional colors, prefixes, suffixes, and other settings you add when creating a formula on a widget will translate to the formula editor.

## How to create a formula on a dashboard widget

Click

**New**>**Formula**in the widget settings.Enter a title. This will be the title of your formula, and you’ll be able to find it in the formula list under

**Formulas**in Plecto.Select a data source.

Select a function. If applicable, choose a field from the data source.

(Optional) Add filters. For example, if you only want to see the calls with status "Answered."

Choose what date field Plecto should calculate data from. By default, it will use the default date field in the data source. Read this article to learn more about the default date.

Choose the output format. If you want to visualize numbers, keep the

*Decimal number*format. If you want to show text, change it to*Text*, and so on.(Optional) If the output format is a numeric value, you can decide how many decimals to show behind the decimal point.

(Optional) Lower value is better – if enabled, this will reverse the trend indicator. For example, if your goal is to get from 30 support tickets to 10.

(Optional) Add conditional colors. For example, 0 for red, 50 for yellow, and 100 for green.

(Optional) Add a prefix or a suffix.

Click

**Save**widget to finish.

## How to override formula settings

Enable the **Override formula settings** slider on the widget. From there, you can customize how the formula result appears on the widget. You can adjust the following settings:

**Decimals**(for formulas that output number values): Decide how many decimal numbers to show after a decimal separator (dot or a comma, depending on your localization).**Lower value is better**(for formulas that output number values): If enabled, this will reverse the trend indicator. For example, if your goal is to get from 30 support tickets to 10.**Conditional colors**: Add custom conditional colors to the widget.**Prefix**and**Suffix**: Add custom numbers or text before or after the formula output. For example, $ or USD.