Skip to content

calc/all-dimensions-accounted

Severity warning by default. It runs on calc-script bodies (.csc) in Rules only, since a Template or Script is a fragment inlined into a Rule at Deploy and slices only the dimensions it needs itself. It needs the dimension data that a Pull or a Snapshot Import writes, so it stays quiet until the Pod has been populated.

Each dimension in the application is counted as accounted for when at least one of its members appears inside a FIX(, FIXPARALLEL(, or EXCLUDE( member list, or as the anchor of an assignment or a calc block, including every link of a cross-dimension anchor such as "Net Income"->"FY Total". Members on the right-hand side of an expression are inputs, not slice, so they do not count. Aliases count for their dimension. The rule reports one finding per file, at the top, because the problem is text that is absent.

It deliberately says nothing in two situations: when a slice or an anchor uses a Run-Time Prompt, a Design-Time Prompt, or a substitution variable, since the real coverage cannot be known at rest, and when the script accounts for no dimension at all (a bare CALC ALL; or a pure AGG), which is not slice-targeted work.

A dimension the script never names is calculated across every one of its members. On a wide Product or Entity dimension that turns a short calculation into a long one, and it can write blocks you did not intend to touch. Nothing fails, which is why this one is easy to ship: the Run succeeds, it only takes much longer and moves more data than the author expected.

The application acmeplan has Account, Entity, Period, Scenario, Version, and Product. This Rule names Scenario, Version, and Period in the slice, and Account through the assignment anchor:

FIX( "Plan", "Working", "FY Total" )
"Net Income" = "Revenue" - "Total Expenses";
ENDFIX

The finding sits at the top of the file:

These dimensions are never accounted for: Entity, Product. Name each one in a FIX(...) or use it as an assignment anchor — a dimension the script never names is calculated across all of its members.

Corrected by naming the two missing dimensions in the slice:

FIX( "Plan", "Working", "FY Total", @RELATIVE("Entity", 0), "Total Product" )
"Net Income" = "Revenue" - "Total Expenses";
ENDFIX

Change its severity or turn it off in the Validation Rules panel, or exempt one artifact with an Exception. A Rule that really is meant to sweep a whole dimension is a fair Exception; leaving the rule on elsewhere keeps the accidental cases visible.