Contact us
Insights

Testing a Power BI measure

A measure can look right on one visual and be wrong on another. How to test it against known figures before people rely on it.

The problem

Right on the card, wrong in the table

A Power BI measure is a formula that recalculates for every filter, slicer, and row it’s shown in. It might be correct for the total and wrong for each month, or right by store and wrong by product. Without testing, the first person to notice is often someone senior comparing it with a figure they already know.

Test cases

What to test every measure against

A known total

A figure from the source system or the accounts for a closed period.

Breakdowns that add up

The values by month, store, or product should add up to the total, unless the measure is deliberately non-additive.

Filters and slicers

Check the figure with each common slicer applied, and with combinations.

Edge cases

Periods with no sales, new stores, products with returns but no sales, and the current incomplete month.

Testing

How to test a measure

Step 1 of 4

  1. In plain words, what the measure means and what it includes.

  2. Get agreed figures for a few cases from the source or finance.

  3. A hidden report page showing the measure beside the expected values and the difference.

  4. Check the test page whenever the model or the measure changes.

Watch averages and percentages

Ratios cause most measure mistakes. For example: the average of each store’s margin percentage isn’t the company’s margin percentage. Calculate ratios from totals, total margin divided by total sales, so they’re right at every level of the report.

Power BI figures people don’t trust?

Tell us which reports and measures are questioned. A few lines are enough.

Tell us what’s not working