Table of Contents

DAX Editor

Semantic Modeler includes a built-in code editor for writing DAX expressions, M (Power Query) queries, and TMDL definitions. It's used everywhere you write code in the app: measure expressions, calculated columns, partition queries, role filters, and the DAX Query Runner.

Editor Features

  • Syntax highlighting for DAX, M, and TMDL
  • Keyword autocompletion for DAX functions
  • Multi-line editing with Tab indentation
  • Inline syntax validation that flags errors as you type
  • Full-screen mode: click the expand button to open the editor in a larger modal window, useful for complex expressions

Writing Measures

When you select a measure in the Explorer, its DAX expression appears in the Properties panel. Edit the expression directly. The editor provides highlighting and autocompletion to help you write correct DAX.

Set the format string alongside the expression (e.g., #,##0.00 for currency, 0.0% for percentages).

DAX Query Runner

The DAX Query Runner lets you write and execute ad-hoc DAX queries against your deployed model without leaving the app.

  1. Open the DAX Query Runner from the toolbar.
  2. Write your query (e.g., EVALUATE SUMMARIZECOLUMNS(...)).
  3. Click Run.
  4. Results appear in a table below the editor.

This is useful for testing measure logic, exploring data, and debugging filter context.

Topic Link
DAX overview Data Analysis Expressions (DAX)
DAX function reference DAX function reference
Power Query M language Power Query M formula language