PBI Semantic Authoring
Semantic-layer work through manage_semantic. Read only the references needed for the current task.
Decide the semantic path
- Prefer a measure for reusable business logic. Choose a calculated column only when a persisted row-level attribute is required — creating one is a
manage_schemacreate_calc_columnoperation covered bymcp-engine-schema-authoring. - Ground names first:
list_model{ "operation": "list", "spec": { "type": "measures" } }(repeat with"tables";spec.typetakes one value per call), and check for an existing equivalent with{ "operation": "search", "spec": { "query": "<name>", "mode": "name" } }before creating a near-duplicate measure. - Keep semantic edits separate from table or relationship edits unless the task explicitly spans both.
Branch by object type
- Measures and KPIs (
create_measure,update_measure,create_kpi): measure-authoring-guide. When logic placement is unclear: modeling-best-practices-guide. - Calculation groups (
create_calc_group): calc-groups-guide. DAX UDFs (create_udf): dax-udf-guide. - Named expressions (
create_named_expression): named-expressions-guide. Power Query parameters (create_pq_parameter, RangeStart/RangeEnd): power-query-parameters-guide. - Model properties (descriptions, culture, annotations, implicit-measure behavior): model-properties-guide. Naming, folders, and style cleanup across many objects: semantic-layer-style-guide.
Guardrails
- Follow the model's existing naming and folder conventions unless the user requests a deliberate change.
- Validate each new or changed measure with a scoped
run_query{ "operation": "execute", "query": "<query evaluating the measure>" }in a realistic filter context. - Use
dry_run: trueand per-item identifiers for bulk semantic edits.
Report results
After semantic work, report:
- Each object created or changed, with its DAX or M expression.
- Whether
dry_runor bulk mode was used and the outcome. - The validation query run and its result.
- Naming or folder decisions that follow (or deliberately break) model conventions.