Skip to content

SQX014 — Row-level expression in a measure

Severity: error — blocks saving until fixed.

A bare column appears outside the places columns are allowed (aggregation arguments, Calculate predicates, Fixed/modifier arguments, column-typed signature parameters). A measure must reduce to one value per group — SquareX has no row context.

Row-level logic like Switch(Sales.Segment, …) belongs in a calculated field; aggregate its result in the measure.

// fails: bare column at measure level
SegmentLabel := Switch(Sales.Segment, "A", "Alpha", "Other")
// row logic → calculated field; the measure aggregates it