# Compare data in a matrix

The Matrix feature in Flex Modes lets you analyze two dimensions at once by turning selected entities into columns. This pivot-style view makes side-by-side comparisons easy, so you can quickly spot patterns, gaps, and opportunities across your data. For example, suppose you want to compare the performance of your sales reps side-by-side against the regions where you sell your products.

{% embed url="<https://phocassoftware.wistia.com/medias/lgphza565k>" %}
Compare data in a matrix
{% endembed %}

1. Select the first dimension you want to matrix (Sales Rep). This is the one that will be transformed into columns in the grid.&#x20;
2. Select the rows of the entities you want to matrix (top 5 performing sales reps). As with the **Focus** button, when you select rows, the **Matrix** button becomes active in the filter bar.&#x20;

   <div align="left"><figure><img src="/files/OBNkKbxUkbu3HckBBLSK" alt="" width="276"><figcaption></figcaption></figure></div>
3. Click the **Matrix** button. The other data is filtered out and the grid updates to show the selected rows, which are also transformed into columns. A matrix tag displays on the right of the filter bar.

   <div align="left"><figure><img src="/files/1YH0D50zk0NyR1jHK21l" alt="" width="563"><figcaption></figcaption></figure></div>
4. Select the second dimension you want to include in the matrix (Region). Its data displays in rows in the grid, so you can see the values against each of the other dimension's entities (sales reps columns).

   <div align="left"><figure><img src="/files/daJB6cvR2QkRCznVIq0Z" alt="" width="525"><figcaption></figcaption></figure></div>

In the matrix grid, you can continue your analysis.

* Focus on specific rows to reduce the dataset in the matrix.
* Apply conditional formatting to highlight specific data.
* Pivot the matrix (switch the dimensions around). Select the rows then click the **Pivot** button. The rows are transformed into columns and vice versa.

<figure><img src="/files/0esogRjLWz9OqTQ5JP4p" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.phocassoftware.com/analytics/flex-modes/compare-data-in-a-matrix.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
