# 3.7. Deviation

In data visualization, showing the deviation or the difference between two axis categories is essential in evaluating performance, identifying anomalies, and for subsequent planning. Analytics+ provides built-in options like First to Last, Min to Max, and Penultimate to Last which you can apply in a single click. You can also set a custom deviation and add more than one deviation line. Let's jump in.

## 1. Deviation

### 1.1. Enabling deviation

You have two options to display the deviation:

* Click the deviation button to - Analytics+ will automatically plot a deviation
* Click Customize to open Deviation settings and turn on the **Show deviation** toggle.

{% hint style="info" %}
After plotting the first deviation line, you can use the **Add deviation** option to plot additional deviation lines. Click on the start category and end category bars to plot custom deviation lines.
{% endhint %}

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F2nWqt8uEqK1aDAgEDRfH%2Fimage.png?alt=media&#x26;token=372087ea-cfcc-4bfa-aee6-9b90bd6c2ffb" alt=""><figcaption><p>Enabling deviation</p></figcaption></figure>

Users in reading view can interactively plot deviations - click on the first bar and as you drag the mouse pointer, you'll notice the deviation being plotted dynamically. Click on the target bar to render the deviation line.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FoR1zRJUXyl1Co0636U29%2FUntitled%20Project.gif?alt=media&#x26;token=34a95d8e-f74f-48de-a461-f54b347505aa" alt=""><figcaption><p>Interactive deviations in reading view</p></figcaption></figure>

You can also display deviations with labels positioned either at the top or along the side. Select the **Top view** or **Side view** option then click the start and end bars to plot the deviation lines.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F7dyemZDwlMtwOWKwX9tf%2Fimage.png?alt=media&#x26;token=0c621637-9b7e-433b-b1fc-cb0b607c63d8" alt=""><figcaption><p>Top view and side view for deviation lines</p></figcaption></figure>

### 1.2. Deviation Settings

#### 1.2.1 Display

You can choose the categories between which to display the deviation. You can also set the color for positive (default: green) and negative (default: red) deviation from the display section.&#x20;

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2Fxh25B2POBBLWTr4515GX%2FDeviation.gif?alt=media&#x26;token=68651fbd-395c-4a09-a3f1-1ccb58f89ab7" alt=""><figcaption><p>Deviation types</p></figcaption></figure>

Analytics+ allows you to specify a custom deviation if the built-in options do not meet your requirements. You can specify the measure and indexes of the categories for which the deviation should be plotted. In the example, we have plotted a custom deviation line between the January and June bars.

{% hint style="info" %}
You can also choose the **Create your own** display option to plot a custom deviation line. After choosing this option and clicking Apply, click on the start and end bar to plot the deviation line dynamically.
{% endhint %}

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F59X7X2CL1X1Qzqungi7S%2Fimage.png?alt=media&#x26;token=589c93a5-6a4f-43d3-9dad-ed4cc2f17506" alt=""><figcaption><p>Plotting a custom deviation line</p></figcaption></figure>

#### 1.2.2. Deviation between groups

You can select the **Deviation between groups** option to show the deviation for measure groups within each category for cluster column charts.&#x20;

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FLCnbdujpriSAi7ODruYl%2Fimage.png?alt=media&#x26;token=2f770e71-ddac-40d6-9fd1-3bc9d023be4c" alt=""><figcaption><p>Deviation between groups</p></figcaption></figure>

#### 1.2.3. Label display

The deviation can be displayed as a percentage or the actual difference in value. You can also opt to display both.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F4JRrqFN3KBaobPcdgOcd%2Fimage.png?alt=media&#x26;token=818fe6cd-2c50-44d1-9e78-eb52329acaee" alt=""><figcaption><p>Deviation label display</p></figcaption></figure>

#### 1.2.4. Use id

Analytics+ plots Deviation lines based on their axis number order. If you apply filters on axis categories, this may lead to rendering unexpected deviations.&#x20;

In the animation, notice how Analytics+ automatically re-renders the deviation based on the available axis categories:

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FtStnrP4kUd8CFJeZO5E5%2FUntitled%20Project.gif?alt=media&#x26;token=938bc068-f49d-4d68-8087-891ee2372ada" alt=""><figcaption><p>Deviation changes based on axis category filters</p></figcaption></figure>

Enable the **Use id** toggle if you do not want your deviation to change dynamically. The deviation line between February and September will be removed when you apply filters.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F25B5PLtMTre84d25j4AH%2Fimage.png?alt=media&#x26;token=b7e4529b-f5e0-49d6-9634-9dd3ccf333e3" alt=""><figcaption><p>Use id option</p></figcaption></figure>

#### 1.2.5. Font

You can set the font color and font size. To set a custom font color, disable the Auto color toggle.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2Fj96Gm23249jsB0dzwM3J%2Fimage.png?alt=media&#x26;token=eb02174f-76d7-4bb0-b439-369d180cc833" alt=""><figcaption><p>Setting the font color</p></figcaption></figure>

#### 1.2.6. View type

Plot the deviation label at the top or position it to the side of the deviation line.

<div><figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FNYPYebWlgkwjMhO0OClt%2Fimage.png?alt=media&#x26;token=e6fd136c-aea0-445f-b1c5-26065367c25f" alt=""><figcaption><p>Top view deviation</p></figcaption></figure> <figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2Fr4Xri4vYuF2SvauCEdwk%2F2024-11-21_14h30_55.png?alt=media&#x26;token=dea13b74-29dc-41d9-8d09-99fa932c92a9" alt=""><figcaption><p>Side view deviation</p></figcaption></figure></div>

#### 1.2.7. Shape

You can plot a rectangular or elliptical border around the deviation.

<div><figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F4yrJWRjulZUfxNd4JlWf%2Fimage.png?alt=media&#x26;token=b0a6a994-5d45-4fad-addd-2c80e34f90ca" alt=""><figcaption><p>Deviation border - Ellipses </p></figcaption></figure> <figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FfotpszmxOkcxLAuREBko%2F2024-11-21_14h43_31.png?alt=media&#x26;token=98e63ca6-04ea-4555-96ec-1b1cedde8a90" alt=""><figcaption><p>Deviation border - Rectangle</p></figcaption></figure></div>

#### 1.2.8. Style

You can highlight the deviation by setting a border, background color, or both. If you are using a background color, you can also calibrate the transparency.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FXu4LkvDE0c7jQExqHGvD%2FDeviation%20(1).gif?alt=media&#x26;token=93e0a216-1dea-4605-8038-82001413299d" alt=""><figcaption><p>Border and background for deviation</p></figcaption></figure>

#### 1.2.9. Line corner

You can denote the ends of the deviation line with dots or a bar instead of the default arrow marker.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F6k03a3wJOppum85LOGPZ%2Fimage.png?alt=media&#x26;token=f6bdb8de-6008-4cbf-aeca-f887c1a65ebc" alt=""><figcaption><p>Line markers for deviation</p></figcaption></figure>

#### 1.2.10. Connection line

Choose between Solid, Dashed, and Dotted styles for the deviation line. You can customize the thickness of the lines.

<div><figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F5kcA3nqnB1vfFpUA1SMv%2Fimage.png?alt=media&#x26;token=a88fc975-7c99-4995-96ed-218b27bbb2f2" alt=""><figcaption><p>Solid connector line</p></figcaption></figure> <figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FWyxicLbNzzsxEwEs8jpU%2F2024-11-21_14h54_19.png?alt=media&#x26;token=8f2b61af-d08e-48b4-8d05-808c52947df9" alt=""><figcaption><p>Dashed connector line</p></figcaption></figure> <figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2Fr6FZwYf4Jme9PhBUhX0k%2F2024-11-21_14h55_05.png?alt=media&#x26;token=ced3fe21-0586-4d9f-a7b0-86b95b72de5b" alt=""><figcaption><p>Dotted connector line</p></figcaption></figure></div>

#### 1.2.11. Show start indicator

Highlight the starting point of the deviation connector line.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FGnIJebz2JVXDQuCTxLA2%2Fimage.png?alt=media&#x26;token=b506f7e0-9766-4f5f-aa68-959814d91dc8" alt=""><figcaption><p>Show start indicator</p></figcaption></figure>

#### 1.2.12. Number Formatting

* **Show in percentage points (pp)**

Depict the deviation value in percentage points when the [scaling for your data](https://docs.inforiver.com/analytics+/working-with-analytics+/3.8.-display-settings-for-charts/charts-number-settings#id-2.2.-scaling) is set to percentage.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FBbYmfIAOv0OoKX4guBPI%2Fimage.png?alt=media&#x26;token=14377cda-901f-42d1-b52d-11568763c159" alt=""><figcaption><p>Show deviation in pp</p></figcaption></figure>

* **Show in basis points (bps)**

Depict the deviation value in basis points when the [scaling for your data](https://docs.inforiver.com/analytics+/working-with-analytics+/3.8.-display-settings-for-charts/charts-number-settings#id-2.2.-scaling) is set to percentage.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FRN7XPIFZnJwbdf8KQ1u4%2Fimage.png?alt=media&#x26;token=1969ac04-385e-485b-a83f-b1d0f258e028" alt=""><figcaption><p>Show deviation in bps</p></figcaption></figure>

* **Include signs at extreme**

When this option is enabled, the sign of the deviation will be displayed before any prefixes. Notice how the positive sign is displayed before the dollar symbol after enabling the **Include signs at extreme** option. When this option is disabled, the positive sign will be positioned after the prefix.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FbcLsog99bVPQw2sHeGbV%2Fimage.png?alt=media&#x26;token=f6ffafd7-9a89-414a-9a13-1abd633f9530" alt=""><figcaption><p>Show signs at extreme</p></figcaption></figure>

* **Value/Percentage**

When number formatting is enabled, you can specify the decimal precision for the value and percentage. Additionally, you can set the scaling factor (thousands, millions, billions, etc) and provide an optional suffix/prefix.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2Fs8aDH0hMFjMZ2vF3LtWZ%2Fimage.png?alt=media&#x26;token=977541fb-ea17-4010-a88e-6f28f8ce998c" alt=""><figcaption><p>Adding scaling, precision and prefixes</p></figcaption></figure>

## 2. CAGR

Plotting the CAGR in charts helps gauge the growth of an investment or business over a year or over a period of time without being distracted by individual fluctuations.

#### 2.1. Show CAGR

Enable the toggle to plot CAGR. You can assign colors to represent positive and negative CAGR values.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2Fvqb1b9PD7vtP19HLc5Xa%2Fimage.png?alt=media&#x26;token=229ea251-2af1-438a-9cf1-4ff8cd371ed5" alt=""><figcaption><p>Enable CAGR</p></figcaption></figure>

#### 2.2. Value type

You can plot CAGR between custom axis points by specifying the start and end index. Analytics+ plots CAGR between the first and last points by default.

<div><figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FVQqrg6QAaWbiNyXbKGnH%2Fimage.png?alt=media&#x26;token=8b5df474-68a7-4df8-822a-ccd71a4fcd4a" alt=""><figcaption><p>Default CAGR</p></figcaption></figure> <figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FHburBvaWV0DRZb4oG37X%2F2024-11-21_17h15_57.png?alt=media&#x26;token=8f4fef7d-291f-42f2-be24-887e82b85ba4" alt=""><figcaption></figcaption></figure></div>

#### 2.3. Units

Specify the time period for which to plot CAGR: Year/Quarter/Month/Day/Hour. For non-date dimensions, select Points.

<div><figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F0gSyHT0poKmKMabmn77A%2Fimage.png?alt=media&#x26;token=f7b57205-a15a-4daf-a3bf-0df5ffa6f8a5" alt=""><figcaption><p>Units - Year</p></figcaption></figure> <figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2Fywrx9c1blaXIhdGcrneh%2F2024-11-21_17h04_39.png?alt=media&#x26;token=8b4b97d4-d3a4-4a40-8f86-7af2921df868" alt=""><figcaption><p>Units - Quarter</p></figcaption></figure></div>

<div><figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FLgZ1CnDWKVBHmBOCBr7X%2Fimage.png?alt=media&#x26;token=d55721aa-961c-4154-8c07-cc00524c8641" alt=""><figcaption><p>Units - Days</p></figcaption></figure> <figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FG4EVwZsiPUJqdNmlJ5PU%2F2024-11-21_17h08_28.png?alt=media&#x26;token=bed93b99-7d7c-48d7-9445-a2dc529cf7f8" alt=""><figcaption><p>Units - Points</p></figcaption></figure></div>

#### 2.4. Use id

Analytics+ plots CAGR lines based on their axis number order. If you apply filters on axis categories, this may lead to rendering unexpected CAGR lines. Enable the Use id toggle if you do not want your CAGR to change dynamically.&#x20;

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FgtKXrjMsa7MLimrDQr4h%2Fimage.png?alt=media&#x26;token=5c8c7c51-20ef-45a8-be32-98f1b7433fec" alt=""><figcaption><p>Use id option</p></figcaption></figure>

#### 2.5. Font

You can set the font color and font size. To set a custom font color, disable the Auto color toggle.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FSveZjqZrzPGD9AVmcwBm%2Fimage.png?alt=media&#x26;token=87b87a52-25b4-4c99-bb70-4327ad5ff5ef" alt=""><figcaption><p>Setting the font</p></figcaption></figure>

#### 2.6. Shape

Set a rectangular or elliptical border for the CAGR value.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FgjcByh0aIVt1CTQ4ziiZ%2Fimage.png?alt=media&#x26;token=51b92cad-f9be-4486-8bab-adb6066c493a" alt=""><figcaption><p>Border shape</p></figcaption></figure>

#### 2.7. Style

Choose between border only, background color only, or border + background color to highlight your CAGR values.

You can additionally set custom border and background colors and specify the opacity for the background color.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FqcP2JSSGzufS54R7LZNt%2Fimage.png?alt=media&#x26;token=4ff2c809-5d51-4569-a1ea-c1071fd56745" alt=""><figcaption><p>Border and background customizations</p></figcaption></figure>

#### 2.8. Arrow

Use a solid, dotted, or dashed connector line between the first and last CAGR points. You can set the thickness of the line as well.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FmgFKgXTbDQnPWY3ofoEy%2Fimage.png?alt=media&#x26;token=3bcfcfdc-2d07-4c2b-9b10-25e5464e52be" alt=""><figcaption><p>Connector line style</p></figcaption></figure>

#### 2.9. Offset

Specify an optional offset between the chart and the CAGR line for enhanced readability.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FTuAse6MJWDrJBvw4qsk2%2Fimage.png?alt=media&#x26;token=e8958ef8-331c-4af1-a603-f23581f49601" alt=""><figcaption><p>Offset</p></figcaption></figure>

#### 2.10. Number formatting

Enable number formatting to specify a custom precision.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FbneL6qiyoBgZeiwCGYun%2Fimage.png?alt=media&#x26;token=7099880a-dd5a-4b64-b0fe-025e5589b608" alt=""><figcaption><p>Number formatting and decimal precision for CAGR</p></figcaption></figure>
