# Boxplots

{% tabs %}
{% tab title="Pre-calculated boxplot" %}

## &#x20;                     <mark style="color:$success;">**Pre-calculated boxplot**</mark>

#### **Chart setup to build a pre-calculated boxplot:**

| Configuration option | Configuration value                                                                                         |
| -------------------- | ----------------------------------------------------------------------------------------------------------- |
| **Axis**             | Drag the dimension to plot on the axis (e.g., Date: Year, Month).                                           |
| **Values parameter** | Drag multiple measures to compare (e.g., Upper Quartile, Lower Quartile, Median, Whisker Max, Whisker Min). |
| **Chart type**       | Select **Boxplot** from the Chart Type dropdown menu.                                                       |

> Boxplots are a standardized way of displaying the distribution of data based on a five-number summary: minimum, first quartile (Q1), median (Q2), third quartile (Q3), and maximum. To render a boxplot, you need to add the lower quartile, median, and upper quartile measures.

When the inter-quartile ranges are pre-calculated, i.e., the 5-number summary is already calculated, you can directly pass the values to render the boxplot.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FD1FmkeobaO4eH3Yz7WPz%2Fimage.png?alt=media&#x26;token=ab6dec06-f9d3-458f-85a6-955c4cf8403f" alt=""><figcaption><p>Pre-calculated boxplot</p></figcaption></figure>

### 1. Pivot data settings for boxplots

**1.1. Boxplot auto sorting**

Analytics+ automatically detects and assigns the lower/upper quartiles and the median and whisker values when this toggle is enabled. You can also manually select and assign the values in the settings pane by disabling this option.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FISGVxl7uPL08qraYsxt9%2Fimage.png?alt=media&#x26;token=5728bfc5-6e99-48e0-8418-d8688858b86c" alt=""><figcaption><p>Boxplot auto sorting</p></figcaption></figure>

### 2. Customization & formatting under canvas settings

**2.1. Lower Quartile/ Upper Quartile/ Median/ Whisker Min/ Whisker Max**

These dropdowns are enabled only when the Boxplot auto-sorting toggle is turned off. You can select the quartile, median, and whisker values from the dropdown menus.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FFUeAcw9z1wCx96AOxsMX%2Fimage.png?alt=media&#x26;token=89ca1b7f-695c-43cc-b014-d7bbfdf53f0f" alt=""><figcaption><p>Quartile assignments</p></figcaption></figure>

You can disable the Median and Whisker toggles if you do not need to plot them.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FwzgSHraaxCopyDHaOhp9%2Fimage.png?alt=media&#x26;token=42a11a04-2b91-4802-9f19-72b97ae07507" alt=""><figcaption><p>Median and whiskers disabled</p></figcaption></figure>

**2.2. Box format**

Set the color and style (Solid, Outlined, Hatched) of the box.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F5ZVQ9GHmcKlZ14A2e2w2%2Fimage.png?alt=media&#x26;token=8c3043ef-46af-4bea-abdb-148dfca60627" alt=""><figcaption><p>Box styling</p></figcaption></figure>

**2.3. Whisker format**

You can set the style, thickness, and color of the whiskers.&#x20;

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FhTdqRfXeeKpsBCOhJALg%2Fimage.png?alt=media&#x26;token=3ade126f-7ed8-4fe6-af55-002b8af5d64f" alt=""><figcaption><p>Whisker format</p></figcaption></figure>

**2.4. Median format**

Set the style, thickness, and color of the median line.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FSjsL4mZ44GZ0Hym4a4sp%2Fimage.png?alt=media&#x26;token=8c356d34-e339-4316-a513-c089a3d49832" alt=""><figcaption><p>Median format</p></figcaption></figure>

**2.5. Stem line format**

Set the style, thickness, and color of the stem lines that connect the boxes to the whiskers.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FtwUJK3ngkfWkz7IRTxTU%2Fimage.png?alt=media&#x26;token=50f77460-b2de-41e1-98a6-3e6f8882e8fe" alt=""><figcaption><p>Stem line format</p></figcaption></figure>

### 3. Conditional formatting for boxplots

When you select the *Charts* option from the **Impacts on** dropdown, you will be able to highlight the boxes based on the quartiles/median/whisker values.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FCOW7Fawmcxlf38XZ6ebF%2Fimage.png?alt=media&#x26;token=46d8dd7d-1261-409a-8936-3f5de96b958a" alt=""><figcaption><p>Conditional formatting for boxplots</p></figcaption></figure>
{% endtab %}

{% tab title="Dynamic boxplot" %}

## &#x20;                         <mark style="color:$success;">**Dynamic boxplot**</mark>

#### **Chart setup to build a dynamic boxplot:**

| Configuration option | Configuration value                                                                                  |
| -------------------- | ---------------------------------------------------------------------------------------------------- |
| **Axis**             | Drag the dimension to plot on the axis (e.g.,Date: Year, Month).                                     |
| **Values parameter** | Drag multiple measures to compare (e.g., Store 1, Store 2 - Store 10 (Sales data across 10 stores)). |
| **Chart type**       | Select **Boxplot** from the Chart Type dropdown menu.                                                |

> Analytics+ accepts pre-calculated quartiles or can calculate the inter-quartile ranges based on the input values provided. In this case, we have provided raw data values, and Analytics+ dynamically calculates the interquartile ranges for the boxplots.

{% hint style="success" %}
For dynamic boxplots, the **Boxplot auto sorting** option needs to be enabled.
{% endhint %}

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FuKONdhVWniiVlqxDm7LY%2Fimage.png?alt=media&#x26;token=362c8a48-4b62-4f74-b752-bd0d214a546f" alt=""><figcaption><p>Dynamic boxplot measure config</p></figcaption></figure>
{% endtab %}

{% tab title="Single-measure boxplot" %}

## &#x20;                   <mark style="color:$success;">Single measure boxplot</mark>

You can render a boxplot with a single measure by following the steps outlined:

**STEP 1:** Add the measure. Add the category dimension to the Small Multiples parameter instead of the Axis parameter.&#x20;

**STEP 2:** In the pivot data window, enable the **Split categories into measures** option.&#x20;

**STEP 3:** Select the Boxplot chart from the Chart Type dropdown.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FKWVaRnkPT5Te0OlPxCbE%2Fimage.png?alt=media&#x26;token=50d7ed32-b4ab-4079-b7b8-b202dbae9f96" alt=""><figcaption><p>Single measure boxplot configuration</p></figcaption></figure>
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Overlapped boxplot" %}

## &#x20;                    <mark style="color:$success;">**Overlapped boxplot**</mark>

#### **Chart setup to build an overlapped boxplot:**

| Configuration option | Configuration value                                                                                                                               |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Axis**             | Drag the dimension to plot on the axis (e.g., Date: Month).                                                                                       |
| **Values parameter** | Drag multiple measures to compare (e.g., Upper Quartile, Upper Quartile PY, Lower Quartile, Lower Quartile PY, Median, Whisker Max, Whisker Min). |
| **Chart type**       | Select **Boxplot** from the Chart Type dropdown menu.                                                                                             |

> Overlapped boxplots can be used to compare previous year quartile values against current values. The upper and lower quartiles for the previous year should be assigned to the **Box (Overlapped)** data well in the pivot data window.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FLVin0viri9KRrxEIxrjL%2Fimage.png?alt=media&#x26;token=0f0639cc-0c46-4479-8970-03a37c8fe2ce" alt=""><figcaption><p>Overlapped boxplots</p></figcaption></figure>
{% endtab %}

{% tab title="Combination/Integrated variance boxplot" %}

## &#x20;           <mark style="color:$success;">**Combination/integrated boxplot**</mark>

#### **Chart setup to build an integrated boxplot:**

| Configuration option | Configuration value                                                                                                         |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| **Axis**             | Drag the dimension to plot on the axis (e.g., Date: Month).                                                                 |
| **Values parameter** | Drag multiple measures to compare (e.g., Upper Quartile, Lower Quartile, Median, Whisker Max, Whisker Min, AC, PY, PL, FC). |
| **Chart type**       | Select **Boxplot** from the Chart Type dropdown menu.                                                                       |

> You can plot four additional measures in a boxplot by assigning them to the Actuals and Comparison data wells. The extra measures will appear as overlay line charts.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2Flkd5vG90ESpfUGiY9aQc%2Fimage.png?alt=media&#x26;token=38e822d4-093a-4d8a-883e-909aa3c8a88a" alt=""><figcaption><p>Combination boxplot</p></figcaption></figure>

### Displaying variances

You can plot the variances for the overlay measures by selecting *Integrated Variance* option from the Canvas Settings > Boxplot > Line Type dropdown.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F6KuzWhPBLHU2S0mvQ6kS%2Fimage.png?alt=media&#x26;token=805b36d7-2d19-4127-877a-84947faffa68" alt=""><figcaption><p>Integrated variance with variance fill type area</p></figcaption></figure>

**Variance fill type**

You can plot the variance fill as an area chart (shown above) or use lines.&#x20;

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F2mwcnlmAmwyCweREVZ7s%2Fimage.png?alt=media&#x26;token=28b95f98-331c-4835-a316-35ea4ce5f55c" alt=""><figcaption><p>Variance fill type - line</p></figcaption></figure>

**Line variance**

Use this option to determine the variance calculation.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FV7kugWKPblG5LswWbUHp%2Fimage.png?alt=media&#x26;token=88e7c501-0537-4b86-ae20-56e495aefe79" alt=""><figcaption><p>Line variance</p></figcaption></figure>
{% endtab %}

{% tab title="Forecast boxplot " %}

## &#x20;                          <mark style="color:$success;">**Forecast boxplot**</mark>

#### **Chart setup to build a forecast boxplot:**

| Configuration option | Configuration value                                                                                                                                                                                         |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Axis**             | Drag the dimension to plot on the axis (e.g., Date:  Year, Quarter, Month).                                                                                                                                 |
| **Values parameter** | Drag multiple measures to compare (e.g., Upper Quartile AC, Upper Quartile FC, Lower Quartile AC, Lower Quartile FC, Median AC, Median FC, Whisker Max AC, Whisker Max FC, Whisker Min AC, Whisker Min FC). |
| **Chart type**       | Select **Boxplot** from the Chart Type dropdown menu.                                                                                                                                                       |

You can also plot forecasts with boxplots by assigning the inter-quartile ranges to the Boxplot (Forecast) data well.

**Note**: To plot a visually appealing boxplot when axis hierarchies are involved, we recommend that the Axis > X-Axis > Category grouping option be disabled. The subtotal boxes will be hidden when this option is disabled.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F8XOXiN4bcwGw0FcctBxv%2Fimage.png?alt=media&#x26;token=143a2cbf-1463-4dc8-9cbf-b04bd96e4d85" alt=""><figcaption><p>Forecast boxplots</p></figcaption></figure>
{% endtab %}
{% endtabs %}

## Additional formatting options

Here are the other settings that help you refine your boxplot.

<table><thead><tr><th width="143.5">Feature</th><th>Description</th><th data-type="content-ref">Link</th></tr></thead><tbody><tr><td>Number</td><td>Configure number formatting (decimals, units)</td><td><a href="../working-with-analytics+/3.-charts/3.8.-display-settings-for-charts/charts-number-settings">charts-number-settings</a></td></tr><tr><td>Legend</td><td>Show/hide and customize the legends</td><td><a href="../working-with-analytics+/3.-charts/3.8.-display-settings-for-charts/charts-legend-settings">charts-legend-settings</a></td></tr><tr><td>Data Label</td><td>Show exact values for each data point</td><td><a href="../working-with-analytics+/3.-charts/3.6.-data-label-customizations">3.6.-data-label-customizations</a></td></tr><tr><td>Trellis</td><td>Create small multiples using category split</td><td><a href="../working-with-analytics+/6.-trellis-customizations">6.-trellis-customizations</a></td></tr><tr><td>Conditional Formatting</td><td>Apply color rules to highlight values</td><td><a href="../working-with-analytics+/9.-conditional-formatting">9.-conditional-formatting</a></td></tr><tr><td>Sorting</td><td>Sort axis order</td><td><a href="../working-with-analytics+/10.-sort-and-reorder-data/sorting-data">sorting-data</a></td></tr><tr><td>Ranking</td><td>Limit to top/bottom N categories</td><td><a href="../working-with-analytics+/11.-ranking-data-topn/ranking-for-charts">ranking-for-charts</a></td></tr></tbody></table>
