DataPrism's measure editor has an AI that writes a measure's expression for you: from a description you type, from the measure's name alone, or as a repair when a save fails. The editor's controls live on Measure editor; this page covers how the AI works and what its expression must obey.
Revenue share of each region within its year. . ., and click Generate.The AI replaces the editor's content in one change, and nothing is saved until you save. If it has something to flag, it arrives as a note in the AI notes toast.
With a name in the Measure name field, press Ctrl+Enter there, or click the control beside the field (its tooltip reads Generate expression from the measure name (Ctrl+Enter)). The request carries just the name, so the AI builds what the name says, following the way Power BI authors name measures: a measure named Revenue YoY % is written as growth over the previous year.
When a save is refused, the banner above the editor carries the reason. Click Fix with AI: the AI receives the expression that failed and the error it hit, and writes one minimal correction that keeps your intent, the same aggregates, constants, rounding and structure.
AI updated the measure - review and save. Review the expression and save the measure again; nothing reaches the model until then.sum("Revenue"); every raw column reference sits inside an aggregate, so sum("Revenue") - sum("Cost") is valid where "Revenue" - "Cost" is not.SELECT, no WITH, no subquery, no table function, no dictionary access, no alias and no SETTINGS clause; the expression never references the measure itself, because the platform declares it under the measure's name."Orders". "Amount". It never invents a name it cannot see.measure validation failed: measure name "<name>" collides with a column or BI table name of the semantic model.Every save runs the platform's checks first: the expression is probed in the shape a chart will run it in, over no rows, and it must produce exactly one value of a chartable type. When a check fails, the save is refused and the message begins measure validation failed:; the text after the colon tells you which check spoke.
measure validation failed: the expression is not allowed: followed by one sentence per problem, joined with ; , for example subqueries are not allowed in measures, table functions are not allowed in measures, references to tables are not allowed in measures, dictionary and join-table access is not allowed in measures, a SETTINGS clause is not allowed in measures and aliases are not allowed in measures. Which sentences appear depends on the server behind your platform.measure validation failed: changing the sql of "<name>" breaks dependent measures: <names> when the change would stop other measures working. The names listed are the measures that would break.Open the message's full text from the banner before you fix it, or let Fix with AI make its one repair pass.
Time intelligence, running totals, shares and ranks come from windows inside the measure. The AI writes them with PARTITION BY ALL, a DataMind macro the chart expands at run time to the chart's group-by columns minus the window's order columns:
lagInFrame(sum("Revenue"), 1, 0) OVER (PARTITION BY ALL ORDER BY "Year")Grouped by year, that expression compares each year with the previous one; add another grouping to the chart and the comparison stays within each value of it, so one measure fits many charts.
measure "<name>" requires column(s) [. . . ] among the chart's group-by fields; the bracketed list names the missing columns.The model's tables and columns with their types, and the model's other measures. It reads no rows of your data; it writes the expression, and the expression meets the data only when a chart runs it.
Because the model already defines those pieces, and building on them keeps every result consistent: a later fix to the base measure flows into the measures that use it. It writes the raw aggregation only where reuse would not work.
The AI writes the closest valid measure it can and explains the gap in its notes. It never invents a column to satisfy the request.
nullIf(. . . , 0)?So division by zero reads as an empty value instead of an error. Every denominator is guarded this way, for example sum("Revenue") /.
measure validation failed:?The platform's checks refused the expression, and the text after the colon names the reason: a forbidden pattern (the expression is not allowed: with the sentences for each problem), the database's own error, or a failed check. Correct the expression and save again, or let Fix with AI do one repair pass.
The measure uses a window, and the window's columns are not among the chart's group-by fields. The refusal names the missing columns: add them to the chart, or use the measure on a chart that already groups by them.
PARTITION BY ALL?A DataMind macro. The chart expands it at run time to the chart's group-by columns minus the window's order columns, and to a single partition when nothing is left. That is what lets one previous-period or running-total measure fit many chart groupings without changes.
No. The AI writes into the measure editor as an unsaved change; nothing reaches the model until you save the measure. A repair works the same way: review it, then save.
No. It writes the one expression for the measure you have open and reads the rest of the model only to build on it. To change columns, relationships or other measures, use the Model AI chat.