Calculations - Profitbase/PowerBI-visuals-FinancialReportingMatrix GitHub Wiki

Financial Reporting Matrix includes an in-visual formula engine called Eaze. Use it for calculations that depend on the report's displayed rows and columns, such as custom subtotals, variance columns, ratios, conditional formatting rules, and calculation overrides.

Eaze and DAX solve different problems

Use DAX when Use Eaze when
The calculation should be reusable across visuals The calculation belongs to this matrix layout
You need model relationships, filter context, or raw columns You need to reference specific displayed rows or columns
The result should live in the Power BI data model The result should be saved with the visual's configuration
Standard aggregation or time intelligence is sufficient You need cross-row math, a custom subtotal, or an in-visual override

Power BI evaluates the matrix data first. Financial Reporting Matrix then applies its saved Eaze steps to the resulting table. This is why Eaze can work with custom rows and columns that do not exist in the data model.

Where calculations are used

Eaze formulas can be used when you:

  • Add a custom subtotal row.
  • Add a custom column.
  • Override a column calculation.
  • Add a custom measure formula.
  • Define conditional formatting.
  • Apply row or cell options through the formula editor.

Create a formula

  1. Enter the visual's Edit mode.
  2. Right-click the row or column you want to change.
  3. Choose the relevant calculation command.
  4. Enter a title when the command creates a new row or column.
  5. Build the formula by typing operators and functions, then clicking cells to insert references.
  6. Choose an optional style and format string.
  7. Save the step and verify the result across detail rows and totals.

Click-to-reference is the safest way to construct row and column references. It avoids mistakes in the internal selectors used by the visual.

Common patterns

Sales + OtherIncome

Adds two report rows to create a subtotal.

Actual - Budget

Creates an absolute variance.

IF(ISNULLORZERO(Budget), null, (Actual - Budget) / Budget)

Creates a variance percentage while avoiding division by a null or zero Budget value.

IF(this < 0, "custom1", "custom2")

Chooses a style based on the current value when used in an appropriate formatting expression.

[!NOTE] Function names, selectors, and row IDs must match the syntax expected by Eaze. Use the function reference for the exact signature and test formulas with blank and zero values.

Function reference

Important behavior

  • Calculations are saved as Applied steps with the report.
  • Applied steps execute in list order, so a later step can override an earlier one.
  • Calculation workspaces depend on Measure Placement. Choose the intended placement before building a large set of calculations.
  • If a formula returns NaN, first check for null values or division by zero and review the exact row and column references. NZ converts null or empty values to zero; use ISNULLORZERO when a zero denominator must be handled explicitly.

See Applied steps for editing, ordering, searching, renaming, and deleting saved steps.