Almanac
Microsoft/power-biPower Platform

Consultant KB for Microsoft Power BI: semantic models, DAX and modelling, Power Query and dataflows, reports and visuals, the service and workspaces, capacity and performance, embedding and integration, governance and security, ALM and deployment, and licensing, plus cross-cutting decision guides. Scoped to Power BI, with Microsoft Fabric covered where it touches Power BI directly. Implementation notes, configuration decisions and the gotchas that bite on real projects. Populated by the daily author agent from the Power BI release plans, docs repo and product blog, plus the author's own consultant notes.

feature-visual-calculations.mdv1 · history
CurrentApplies to BothUpdated last hourSource Microsoft Learn ↗

What it does

A visual calculation is DAX written against a single visual and evaluated on the data that visual shows, not on the semantic model. You add it in Edit mode from the formula bar, and it can refer to other fields in the visual by position, which makes running totals, moving averages and previous-period comparisons short formulas rather than context-transition puzzles.

Key facts

  • It lives in the report, not the model. Nothing is added to the semantic model, so it doesn't need write access to it and can't be reused by another visual.
  • Axis is optional and defaults to the first axis, usually ROWS. Values include ROWS, COLUMNS and ROWPAGES, singly or combined to set traversal order (ROWS COLUMNS, ROWPAGES ROWS). An axis the visual doesn't have is ignored.
  • Visuals with small multiples are supported. The field in the Small multiples well sits on the ROWPAGES axis, so use ROWPAGES to calculate across the multiples.
  • Reset takes an integer, a column reference, or NONE (default), HIGHESTPARENT or LOWESTPARENT. Positive integers are absolute, negative integers relative.
  • The function set is specific: COLLAPSE, COLLAPSEALL, EXPAND, EXPANDALL, FIRST, LAST, ISATLEVEL, LOOKUP, LOOKUPWITHTOTALS, MOVINGAVERAGE, NEXT, PREVIOUS, RANGE and RUNNINGSUM, plus many standard DAX functions. Relationship functions (USERELATIONSHIP, RELATED, RELATEDTABLE) aren't available.
  • Unsupported visuals include slicers, R and Python visuals, Key Influencers, Decomposition Tree, Q&A, Smart Narrative, paginated report and custom visuals.
  • Unsupported features include filtering or sorting on the calculated field, changing aggregation, dynamic format strings, personalisation and See records drill-through. Pinning to dashboards and Publish to web aren't available, and exports don't include the calculated values.
  • Live connections to SQL Server Analysis Services need version 2025 or later. Field parameters work with limits.

When to use / skip

Use it for presentation-layer calculations that only make sense in one visual: running totals, rank within a visible group, percent of the visible parent, a comparison with the previous row. It's quick to write and doesn't touch the model.

Skip it when the number is a business definition that other reports need. That's a measure, owned and tested in the model. Also skip it where the calculation has to survive export, a dashboard pin or Publish to web.

Configuration decisions

  • Whether a calculation is a one-off for this visual or a measure the whole model should own.
  • Axis and Reset for any calculation that crosses hierarchy levels, and whether small multiples are in play.
  • Who maintains the calculations, since they sit inside individual visuals and aren't visible in the model view.

Gotchas

  • Moving, swapping or removing a field in the visual changes what the calculation sees. A formula that read correctly yesterday can silently mean something else after someone edits the field wells.
  • Totals and subtotals behave differently from detail rows. Check them with LOOKUPWITHTOTALS and ISATLEVEL rather than assuming.
  • Users who export to Excel won't get the calculated column, and people who pin to a dashboard lose it entirely.
  • It's easy to hide a business rule in a visual where governance never sees it.

Consultant notes

  • Agree a rule early: anything two reports might need becomes a measure; visual calculations are for layout-dependent maths only.
  • Review a report's visual calculations before sign-off. They're invisible to model-level tooling, so the usual tests and lineage checks won't find them.
  • If a client's requirement says "exportable" or "on the executive dashboard", find out before you build, not after.
  • Small multiples with ROWPAGES are fine for a prototype, but test them with real category counts. The traversal order is easy to get subtly wrong.

Worth revisiting after the next Power BI release; the supported visuals and function list keep growing.

Was this accurate?