> For the complete documentation index, see [llms.txt](https://docs.phocassoftware.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.phocassoftware.com/flex-modes/change-your-analysis/switch-modes/variance-mode.md).

# Variance mode

Compare two periods and analyze the variance between them.

{% hint style="info" %}
User permission: **Query**

Without this permission, you can see the default view for this mode but can't change the analysis.
{% endhint %}

Use **Variance** mode to compare two periods and analyze the variance between them.

This mode introduces a second period menu in the toolbar. Together, the period menus control the period comparison:

* **Period:** Select the current (main) period. This is the period that appears as the first value in the variance comparison. For example, you might select the current month, quarter or year.
* **Compared to:** Select the comparison period. The default is **Previous** (same period one year ago), with **Prior Previous** and **Adjacent Previous** also available. You can also compare to a predefined period or select a specific date range.

<div align="left"><figure><img src="https://2122657374-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGOWDU4SqRSiSPGXHgW%2Fuploads%2F4N5inW9JpUd5j2ALWqD8%2Fimage.png?alt=media&amp;token=d420e41d-e68e-4845-8a40-1d681f775c5f" alt="" width="240"><figcaption><p>Comparison period options</p></figcaption></figure></div>

### Summary view

Displays a comparison of the selected period and comparison period.

The grid contains the following columns:

* **Period:** Displays the selected period and the comparison period (in brackets).
* **Current:** Displays the value for the selected period.
* **Cumulative Current:** Displays a running total of the values for the selected period.
* **Comparison:** Displays the value for the comparison period.
* **Cumulative Comparison:** Displays a running total of the values for the comparison period.
* **Variance:** Displays the difference between the current and comparison values.
* **% Variance:** Displays the percentage difference between the current and comparison values.
* **Cumulative Variance:** Displays the difference between the cumulative current and cumulative comparison values.
* **Cumulative % Variance:** Displays the percentage difference between the cumulative current and cumulative comparison values.

<div align="left"><figure><img src="https://2122657374-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGOWDU4SqRSiSPGXHgW%2Fuploads%2FoR95UDG2NroKY83PEXE8%2Fimage.png?alt=media&amp;token=ad650bb4-848d-427e-8066-3b0054871b58" alt=""><figcaption><p>Summary view of Variance mode</p></figcaption></figure></div>

### Dimension view

Displays a comparison of the selected period and comparison period for each entity in the selected dimension.

In this view, the **Properties** and **Columns** menus in the toolbar become available.

The grid contains the following columns:

* **Properties**: Displays the selected properties (such as **Code** and **Name**) for each entity. Use the **Properties** menu to select which properties to display. The available properties depend on the selected dimension.
* **Comparison**: Displays the current value, comparison value, variance and percentage variance for each entity.

<div align="left"><figure><img src="https://2122657374-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGOWDU4SqRSiSPGXHgW%2Fuploads%2F84uhl4G4rQd6dhz05nLV%2Fimage.png?alt=media&amp;token=9538412a-70d1-42f1-878d-1552f33b7fd3" alt=""><figcaption><p>Dimension view of Variance mode</p></figcaption></figure></div>

### Optional breakdown

In the dimension view, you can use **Columns** > **Custom** > **Show all periods** to display a breakdown of the selected period. This helps you identify where the variance occurred.

For example, if you compare the last 3 months with the previous 3 months, turning on **Show all periods** displays each month within the selected period so you can see how each month contributed to the overall variance.

The breakdown contains:

* **Total:** Displays the total value across the breakdown periods. A sparkline provides a visual summary of the values across the selected period.
* **Period columns:** Display the individual periods that make up the selected period.

<div align="left"><figure><img src="https://2122657374-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGOWDU4SqRSiSPGXHgW%2Fuploads%2Fxz3gDRcFFa2YqtVGBkhj%2Fimage.png?alt=media&amp;token=a422f6a7-6c24-4706-94da-76c9ecf4ce2b" alt="" width="452"><figcaption><p>Period breakdown columns in Variance mode</p></figcaption></figure></div>

### Example

Use **Variance** mode to compare a customer's spending for the rolling 12 months with the previous 12 months:

1. Click **Mode** > **Variance**.
2. Click the **Customer** dimension.
3. Locate and select the required customer and click **Focus**.
4. Click **Period** > **Rolling 12 Months**.

<div align="left"><figure><img src="https://2122657374-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGOWDU4SqRSiSPGXHgW%2Fuploads%2FXQ3KHZTJbtbrPb1eiJJw%2Fimage.png?alt=media&amp;token=4eac0226-a4ca-4847-9448-efb0da21e278" alt=""><figcaption><p>Comparison of a customer's sales in the current year against the previous year</p></figcaption></figure></div>

5. Click **Columns** > **Custom** > **Show all periods** to view a breakdown of the customer's monthly sales in the current year.

<div align="left"><figure><img src="https://2122657374-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGOWDU4SqRSiSPGXHgW%2Fuploads%2FcBDMZajbh3KaYjHzIepH%2Fimage.png?alt=media&amp;token=1204e3a6-2443-486d-a587-13a56677eeae" alt=""><figcaption><p>Sales comparison including monthly breakdown for current year</p></figcaption></figure></div>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.phocassoftware.com/flex-modes/change-your-analysis/switch-modes/variance-mode.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
