# Delta Comparisons
URL: https://docs.valsight.ai/scenario-time-or-dimension-level-comparison-delta/
Description: Add a delta comparison to a table so it shows the change between two scenarios, periods or dimension levels, and pick the method that suits your data.
A delta comparison shows the change between two data points in a table: between two scenarios, two periods, two dimension levels such as two products, or two nodes.

## Overview

Comparisons are added to an existing table in the chart editor. Which method you choose matters more than it looks, because two of them disagree whenever the base value is negative.

## Adding a comparison

1. [Create a table chart](/creating-charts/). Setting **Nodes** as rows, with **Years** and **Scenarios** as columns, is a good starting point.
2. In the chart editor, add a comparison. Pick the two values to compare, then set the **Calculation type**.
3. For a **Delta**, which is labeled **YoY** when you compare years, choose one of the three delta methods from the table below. **CAGR** is a calculation type of its own and is offered only when the two values are years.

The same comparison can be built across time, across dimension levels, for example sales for different products, and across nodes.

## Comparison methods

| Method                | What it calculates                                                                                                                                          | Formula                                                                                       |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| **Absolute**          | The plain difference between the two data points.                                                                                                           | `second value - first value`                                                                  |
| **Relative, default** | The relative percentage change, carrying the sign of the absolute change.                                                                                   | `abs((second value / first value) - 1) × signum(second value - first value)`                  |
| **Relative, simple**  | The plain percentage difference.                                                                                                                            | `(second value / first value) - 1`                                                            |
| **CAGR**              | The compound annual growth rate: the average growth needed over the given years to reach the second value. Offered only when the two data points are years. | `abs(abs(second value / first value) ^ (1 / years) - 1) × signum(second value - first value)` |

## Choosing between the two relative comparisons

On a positive base the two agree. They diverge on a negative base, and that is the whole reason the default exists.

Going from **-100** to **-50** is an improvement of 50:

* **Relative, simple** returns `(-50 / -100) - 1 = -0.5`, so **-50 %**, which reads as a decline.
* **Relative, default** takes the size of that change and applies the sign of the absolute change: `abs(-0.5) × signum(50) = +0.5`, so **+50 %**.

Use the **default** relative comparison unless you have a specific reason not to. The simple one is only safe when every base value is positive.

## Related

* [Formatting Charts](/chart-configuration/): sorting, scales and table styles.
* [Data Display in Charts and Tables](/data-display-in-charts-and-tables/): choosing what a table shows, and at which level of aggregation.
* [KPI Charts](/kpi-charts/): a comparison shown as a single figure rather than a table column.
