The measure editor is a floating panel beside the BI tables panel where you write a measure: its name, its SQL expression and its description. It opens when you add a measure or open one for editing, and its lower panes hold the Description, the Tests and a Preview.
For the library around it, its folders and the hide control, see Measures. Tests and previews have their own page: Measure tests.
sum("amount"). The hint under the editor reads The expression must be an aggregation, e. g. sum("amount").PARTITION BY ALL ORDER BY "column" writes a window whose partition comes from the chart at run time: PARTITION BY ALL is replaced with the group-by columns of the chart that uses the measure.Another measure is already named "<name>". Choose a different name or rename the other measure.What this measure means and how to read it.Revenue share of each region within its year. . ., and click Generate.AI notes toast shows them.Failed to generate the measure expression, and the popover stays open for another try.The measure AI needs Use DataPrism AI and edit access to the semantic model. See Who can do what in DataPrism.
The Measure builder offers ready-made patterns by category. Open it from the editor; its tooltip reads Measure builder - <n> ready-made use cases once the catalogue has loaded.
*, and the Generated SQL preview reads -- fill all inputs to generate SQL until the form is complete.Measure patterns could not be loaded. Click Retry.You have unsaved changes to this measure. Leave without saving? and Leave. Leave drops your edits; a measure you never saved disappears.When a save is refused, a banner above the editor shows the reason. Click the message to open the full text in View full message. The banner offers:
AI updated the measure - review and save; review it, then save again. If it cannot, the message reads Failed to fix the measure expression.Two cases are special:
This measure was changed by someone else or the AI. and offers Reload and Overwrite instead. Overwrite saves your version on top of the newer one; Reload shows the newer version, so redo your edit.Measure name is required or Measure expression is required.If the expression uses a pattern that is no longer allowed, the editor warns that the measure still runs and must be fixed before its next save.
Loading history. . .. An error reads Failed to load measure history, an empty measure reads No revision history yet, and the detail pane reads Select a version to preview its expression until you pick one. A copy that does not reach the clipboard reports Failed to copy expression.Unknown date or Unknown user.Measures this expression references. Changing them changes this result. and Measures that reference this one. Renaming or deleting it affects them.No measure named "<name>" exists. Create it or update the expression.Save this measure to configure how its values are displayed.Applies to every report using this measure.).Derived from the expression by the server. Save the measure to refresh it.| Shortcut | What it does |
|---|---|
| Ctrl+Enter | Saves the measure. Inside the Measure name field it generates the expression from the name when the measure AI is available. |
| Ctrl+Space | Shows table, column and function suggestions. |
| Ctrl+Shift+F | Formats the expression. |
| Ctrl+Shift+M | Opens the AI measure popover. |
| Ctrl+Z | Undoes an edit, including an expression the AI replaced. |
| Escape | Closes the editor; while the suggestions are open, it closes them first. |
On macOS, use Cmd where the table shows Ctrl.
The editor remembers its size only while it stays open; every fresh open starts compact. Click Expand for the full height, or open a pane: opening Description, Tests or Preview expands it too.
The editor asks first with Unsaved changes and You have unsaved changes to this measure.. Leave drops your edits; a measure you never saved disappears. Even an empty draft counts as unsaved work, so the editor asks before it closes.
Yes. The AI replaces the expression in one change that stays on the undo stack, so Ctrl+Z restores the expression it replaced.
The expression references a measure that does not exist. Create a measure with that name, or update the expression: No measure named "<name>" exists.
After the AI writes or fixes an expression it can attach reading notes, shown as the AI notes toast. If it cannot write one, the message reads Failed to generate the measure expression and the popover stays open for another try.
Someone, or the AI, saved a change to this measure after you loaded it, so the banner reads This measure was changed by someone else or the AI. Overwrite saves your version on top of the newer one; Reload shows the newer version instead, so redo your edit.
Fix with AI repairs the failing expression in place and reports AI updated the measure - review and save. Continue in AI chat opens the problem in the Model AI chat when you want to work through it in a conversation. Both need Use DataPrism AI and edit access to the semantic model.
Formats belong to a saved measure. Until you save, the tools bar reads Save this measure to configure how its values are displayed.
It needs an expression to format. The control is off while the expression is empty, while the measure is saving and while the AI is generating.
The builder writes SQL only when every parameter is filled. Each parameter is required and marked with *; the preview reads -- fill all inputs to generate SQL until the form is complete.
The pattern's expression uses a SQL window function. The Generated SQL preview shows the query it will write, and a windowed measure is marked in the editor's suggestion list.
Yes. Measure names are compared exactly, so Revenue and revenue can both exist in one model. Keep names clearly different to avoid confusion.