Semantic Layer

manage_semantic is the primary authoring tool for semantic logic:

  • measures (DAX),
  • calculation groups/items,
  • KPIs (if you use them),
  • DAX UDFs (user-defined functions),
  • named expressions (shared M snippets used by partitions).

Use it when you want to change what the model means (business logic), not just the shape of tables/relationships (that’s manage_schema).

You don’t need to know tool parameters-describe the outcome you want, ask for a plan first, then confirm before changes are applied.

What to ask the LLM (quick prompts)

“Create a measure Total Sales (with description + display folder). Then run a validation query.” “Rename measure [Sales] to [Total Sales]. Show dependents and how you’ll update references before applying.” “Create a Time Intelligence calc group (YTD/QTD/MTD). First check if one already exists and whether we have duplicate YTD/MTD measures.” “Add a dynamic format string to [Gross Margin %] and explain when it changes.” “Create a named expression for a shared Power Query step and show where it’s referenced.”

What you can do (capabilities, user view)

Measures (most common)

You can create/update/delete measures and manage the “polish” that makes models usable:

  • DAX expression
  • description
  • display folder
  • format string (static) or dynamic format string expression
  • data category (for URL/image semantics)
  • hidden flag
  • detail rows expression (drillthrough)
  • annotations (key/value metadata)

Copy/paste prompts:

“Create measure Total Sales in table Sales. Add description and put it in folder Sales\\Revenue.” “Hide these helper measures and move them to folder Internal.” “Add a detail rows expression for [Order Count] and explain what it returns.”

Calculation groups / items

Calculation groups are a scalable way to implement time intelligence and other “calculation modifiers” without duplicating measures.

Copy/paste prompts:

“Create calc group Time Intelligence with items: YTD, QTD, MTD. Use Date[Date] and explain assumptions.” “Update calc group Time Intelligence: add item YoY % and set precedence appropriately.” “Show existing calc groups and their items. Recommend whether we should refactor duplicate measures into a calc group.”

Compatibility note:

  • Some calc-group work may require a compatibility upgrade. If that’s needed, ask the assistant to stop and request explicit confirmation (and ensure you have a backup).

KPIs (optional)

KPIs are supported for teams that still rely on them. If you don’t use KPIs, you can ignore this area.

Prompt:

“Create a KPI for [Total Sales] with target and status thresholds. Explain how it will be consumed and how it differs from just using measures.”

DAX UDFs (advanced)

UDFs let you standardize reusable logic. They’re powerful but advanced; adopt them intentionally.

Prompt:

“Create a UDF for standardized YoY calculations. Document parameters, and show an example usage.”

Named expressions (M) (for Power Query / partitions)

Named expressions are shared M expressions you can reference from partitions (helpful for reuse and consistency).

Prompt:

“Create a named expression SharedSource that returns the shared data source step. Then update the relevant partitions to reference it (plan first).”

Risk & governance notes (read this once)

Locked-down environments (mode behavior)

ModeAvailability
Full modeAvailableAvailable
Read-only modeNot availableNot available
Browse-only modeNot availableNot available

Notes: Authoring (writes); calc groups/UDFs may require compat upgrade confirmation.

Learn more about modes and restrictions.

If edits are blocked, ask:

“Give me a semantic change plan (steps + expressions) that I can apply manually in Desktop, plus validation queries.”

The “how to change safely” workflow is shared across tools:

Copy/paste prompt:

“We want a standard Time Intelligence calc group. First check if one exists and list duplicates. Propose a plan and wait for approval. Then apply and validate with 3 queries.”

Tip: for bulk edits, dry runs, and “wait for confirmation” templates, use the guidance in Change safely.

The server can format DAX and M for readability. In some configurations, formatting uses online services and requires explicit consent.

User prompts:

“Format DAX for readability, but don’t use online services unless I explicitly approve.” “Do not format M code online in this environment. Keep it as-is.”

“Disable online formatting in this environment.” (see Preferences runtime settings)

If formatting is blocked:

“Proceed without formatting and keep the change minimal.”

Troubleshooting

Ask for dependency analysis first, then update dependents. If you’re already broken, ask for a repair plan and validate with targeted queries.

Ask: “Explain what compatibility/engine limitation is blocking this and propose an alternative implementation.”

Ask: “Explain whether formatting is disabled by policy/settings; proceed without formatting.”

See also