> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Functional Expenses Matrix

> Functional Expenses Matrix renders the cross-tabulation of natural expense categories against functional expense classifications (program services, management…

Functional Expenses Matrix renders the cross-tabulation of natural expense categories against functional expense classifications (program services, management and general, fundraising) for a selected date range and optional fund filter. Route: `/fa/reports/functional-expenses-matrix`.

## Overview

The Functional Expenses Matrix page is accessible at `/fa/reports/functional-expenses-matrix` and requires permission `fa.reports.view`. The component (`FunctionalExpensesMatrixPage`) calls `useFunctionalExpensesMatrix(orgId, periodStart, periodEnd, fundId)` which invokes the `fa_functional_expenses_matrix()` RPC. Fund options are loaded via `useFunds`. Results are displayed in a `DataTable` with rows typed as `MatrixDisplayRow`:

* `kind: 'line'` — a natural expense category row with columns for `naturalCategory`, `programServices`, `managementGeneral`, `fundraising`, `total`
* `kind: 'total'` — a summary total row

Date range defaults to year-to-date (first of current year through today). Export is available via `ReportExportButtons`.

## Who it's for

Requires permission `fa.reports.view`.

## Before you start

* You must have `fa.reports.view` permission.
* The general ledger must have functional expense classifications applied to transactions.

## Steps

1. Navigate to **Finance → Reports → Functional Expenses Matrix** (`/fa/reports/functional-expenses-matrix`).
2. Set **Period Start** and **Period End** dates (defaults to year-to-date).
3. Optionally filter by **Fund** using the fund selector.
4. Review the matrix table showing natural categories cross-tabulated against program, management, and fundraising functions.
5. Review totals in the summary row.
6. Export the report using `ReportExportButtons`.

## Key concepts

| Concept                       | Description                                                            |
| ----------------------------- | ---------------------------------------------------------------------- |
| `useFunctionalExpensesMatrix` | Hook invoking `fa_functional_expenses_matrix()` RPC                    |
| `naturalCategory`             | Expense category dimension of the matrix; SME: confirm values          |
| `programServices`             | Functional column for program services; SME: confirm allocation method |
| `managementGeneral`           | Functional column for management and general; SME: confirm             |
| `fundraising`                 | Functional column for fundraising; SME: confirm                        |

## Related

<Columns cols={2}>
  <Card title="Finance & Revenue" icon="building-columns" href="/fa/overview">
    Finance & Revenue core overview.
  </Card>

  <Card title="Governance & parity" icon="scale-balanced" href="/governance/index" />
</Columns>

<Note>
  This page documents shipped product behavior. It is not medical, legal, or
  billing advice. Verify against your organization's policies and applicable
  regulations before using it for clinical, compliance, or billing decisions.
  Protected health information (PHI) shown in the product is governed by your
  tenant's access controls and is never exposed in this documentation.
</Note>

<Accordion title="Documentation sources">
  * src/routes/fa.tsx
  * src/cores/fa/pages/FunctionalExpensesMatrixPage.tsx
</Accordion>
