skills/semantic-model-consumption/SKILL.md
Execute raw DAX queries and inspect metadata of Microsoft Fabric Power BI semantic models via the MCP server ExecuteQuery tool. Use when the user already knows the DAX to write, wants to run EVALUATE statements, or needs to inspect model metadata (tables, columns, measures, relationships, hierarchies) using INFO functions. For natural-language business questions (where you generate the DAX), use `fabriciq`. For creating, deploying, or managing semantic model definitions, use `semantic-model-authoring`. Triggers: "run DAX query", "execute EVALUATE", "semantic model metadata", "list semantic model tables", "INFO.VIEW.TABLES", "get measure expression", "DAX against", "query the model".
npx skillsauth add microsoft/skills-for-fabric semantic-model-consumptionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Update Check — ONCE PER SESSION (mandatory) The first time this skill is used in a session, run the check-updates skill before proceeding.
- GitHub Copilot CLI / VS Code: invoke the
check-updatesskill.- Claude Code / Cowork / Cursor / Windsurf / Codex: compare local vs remote package.json version.
- Skip if the check was already performed earlier in this session.
CRITICAL NOTES
- To find the workspace details (including its ID) from workspace name: list all workspaces and, then, use JMESPath filtering
- To find the item details (including its ID) from workspace ID, item type, and item name: list all items of that type in that workspace and, then, use JMESPath filtering
| Task | Reference | Notes |
|---|---|---|
| Finding Workspaces and Items in Fabric | COMMON-CLI.md § Finding Workspaces and Items in Fabric | Mandatory — READ link first [needed for finding workspace id by its name or item id by its name, item type, and workspace id] |
| Fabric Topology & Key Concepts | COMMON-CORE.md § Fabric Topology & Key Concepts | Hierarchy; Finding Things in Fabric |
| Environment URLs | COMMON-CORE.md § Environment URLs | Production (Public Cloud) |
| Authentication & Token Acquisition | COMMON-CORE.md § Authentication & Token Acquisition | Wrong audience = 401; covers token audiences, delegated vs app permissions, OAuth flows, identity types, and Entra app registration |
| Core Control-Plane REST APIs | COMMON-CORE.md § Core Control-Plane REST APIs | Includes workspace/item CRUD, resolve-by-name, pagination, LRO polling, and rate-limiting patterns |
| OneLake Data Access | COMMON-CORE.md § OneLake Data Access | Requires storage.azure.com token, not Fabric token; covers URL structure, ADLS Gen2 parity, and shortcuts |
| Job Execution | COMMON-CORE.md § Job Execution | Run On-Demand Job; Get / Cancel Job |
| Capacity Management | COMMON-CORE.md § Capacity Management | List Capacities; Assign Workspace to Capacity |
| Gotchas, Best Practices & Troubleshooting | COMMON-CORE.md § Gotchas, Best Practices & Troubleshooting | Common Errors; Best Practices |
| Tool Selection Rationale | COMMON-CLI.md § Tool Selection Rationale ||
| Authentication Recipes | COMMON-CLI.md § Authentication Recipes | az login flows, environment detection, token acquisition, and debugging |
| Fabric Control-Plane API via az rest | COMMON-CLI.md § Fabric Control-Plane API via az rest | Always pass --resource; includes workspace/item operations, pagination, and LRO patterns |
| OneLake Data Access via curl | COMMON-CLI.md § OneLake Data Access via curl | Use curl not az rest (different token audience); file list/read/upload/delete and directory creation |
| SQL / TDS Data-Plane Access | COMMON-CLI.md § SQL / TDS Data-Plane Access | sqlcmd (Go) connect, query, CSV export, service principal auth, and connection parameter discovery |
| Job Execution (CLI) | COMMON-CLI.md § Job Execution | Run notebooks/pipelines, refresh semantic models, check/cancel jobs |
| OneLake Shortcuts | COMMON-CLI.md § OneLake Shortcuts | Create a Shortcut; List Shortcuts; Delete a Shortcut |
| Capacity Management (CLI) | COMMON-CLI.md § Capacity Management | List Capacities; Assign Workspace to Capacity |
| Composite Recipes | COMMON-CLI.md § Composite Recipes | End-to-end workspace→lakehouse→file, SQL endpoint→query, and notebook execution recipes |
| Gotchas & Troubleshooting (CLI-Specific) | COMMON-CLI.md § Gotchas & Troubleshooting (CLI-Specific) ||
| Quick Reference | COMMON-CLI.md § Quick Reference | az rest Template; Token Audience ↔ CLI Tool Matrix |
| Prerequisites | SKILL.md § Prerequisites ||
| Must/Prefer/Avoid | SKILL.md § Must/Prefer/Avoid | Guardrails for read-only semantic model usage. MUST DO; PREFER; AVOID |
| Metadata Discovery | SKILL.md § Metadata Discovery | INFO.VIEW.* and INFO.* functions. |
| Recommended Discovery Order | SKILL.md § Recommended Discovery Order | Preferred order for metadata exploration |
| Frequently Used INFO Functions | SKILL.md § Frequently Used INFO Functions | High-usage function list for first-pass discovery |
| Complete INFO Function Catalog (Dynamic) | discovery-queries.md § Complete INFO Function Catalog (Dynamic) ||
| Metadata Object → INFO Function Map | SKILL.md § Metadata Object → INFO Function Map | Inlined mapping for object-focused discovery |
| Query Execution | SKILL.md § Query Execution | ExecuteQuery usage shape |
| Troubleshooting | SKILL.md § Troubleshooting | Resolve common execution and metadata issues |
| Examples | SKILL.md § Examples | Sample Metadata Query; Sample Data Query |
| Scope Estimation Queries | discovery-queries.md § Scope Estimation Queries ||
| INFO Output Columns | discovery-queries.md § INFO Output Columns | INFO.VIEW.* (preferred first-pass metadata); Critical INFO.* (deep metadata / diagnostics) |
| Narrowing Results (Projection + Filtering) | discovery-queries.md § Narrowing Results (Projection + Filtering) ||
| Deep Metadata Queries | discovery-queries.md § Deep Metadata Queries ||
| Dependency Discovery | discovery-queries.md § Dependency Discovery | Dependency rowset for a DAX query; Dependency rows scoped to a measure; Reverse dependencies (what references a measure) |
DiscoverArtifacts to find the semantic model GUID and ExecuteQuery to run DAX queries. These are MCP tool invocations, not shell commands. Do NOT use az rest, Get-Command, or PowerShell scripts to discover or invoke them.INFO.VIEW.* as available to any user with read access to the semantic model; assume other INFO.* functions may require elevated permissions.INFO.VIEW.* / INFO.* for metadata discovery before writing data queries.artifactId) before iterative query refinement.INFO.VIEW.* / INFO.* calls (e.g., SELECTCOLUMNS + FILTER) to fetch only the information directly relevant to the current task instead of retrieving the full schema up front. See discovery-queries.md § Narrowing Results (Projection + Filtering).INFO.VIEW.TABLES() for a fast table inventory.INFO.VIEW.COLUMNS() and INFO.VIEW.MEASURES() for semantic details.INFO.VIEW.RELATIONSHIPS() to validate joins and filter behavior.INFO.VIEW.TABLESINFO.VIEW.MEASURESINFO.VIEW.COLUMNSINFO.VIEW.RELATIONSHIPSINFO.PARTITIONSINFO.MODELINFO.STORAGETABLECOLUMNSEGMENTSINFO.DEPENDENCIESINFO.EXPRESSIONSINFO.ROLESINFO.STORAGETABLECOLUMNSINFO.CALCULATIONGROUPSINFO.CALCULATIONITEMSINFO.CULTURESINFO.OBJECTTRANSLATIONSINFO.USERDEFINEDFUNCTIONSINFO.REFRESHPOLICIESINFO.ATTRIBUTEHIERARCHYSTORAGESINFO.COLUMNPARTITIONSTORAGESINFO.COLUMNSTORAGESINFO.DICTIONARYSTORAGESINFO.HIERARCHYSTORAGESINFO.PARTITIONSTORAGESINFO.RELATIONSHIPINDEXSTORAGESINFO.RELATIONSHIPSTORAGESINFO.SEGMENTMAPSTORAGESINFO.SEGMENTSTORAGESINFO.STORAGEFOLDERSINFO.STORAGEFILESINFO.TABLESTORAGESINFO.GENERALSEGMENTMAPSEGMENTMETADATASTORAGESINFO.DELTATABLEMETADATASTORAGESINFO.PARQUETFILESTORAGESINFO.STORAGETABLES| Metadata Object | Primary INFO functions |
|---|---|
| Model | INFO.MODEL |
| Tables | INFO.VIEW.TABLES |
| Columns | INFO.VIEW.COLUMNS, INFO.GROUPBYCOLUMNS, INFO.RELATEDCOLUMNDETAILS |
| Measures | INFO.VIEW.MEASURES, INFO.FORMATSTRINGDEFINITIONS, INFO.DETAILROWSDEFINITIONS |
| Relationships | INFO.VIEW.RELATIONSHIPS |
| Partitions | INFO.PARTITIONS, INFO.EXPRESSIONS, INFO.QUERYGROUPS, INFO.REFRESHPOLICIES, INFO.DATACOVERAGEDEFINITIONS |
| Security roles & permissions | INFO.ROLES, INFO.TABLEPERMISSIONS, INFO.COLUMNPERMISSIONS |
| Hierarchies | INFO.HIERARCHIES, INFO.LEVELS, INFO.ATTRIBUTEHIERARCHIES, INFO.VARIATIONS |
| Calculation groups/items | INFO.CALCULATIONGROUPS, INFO.CALCULATIONITEMS, INFO.CALCULATIONEXPRESSIONS |
| Perspectives | INFO.PERSPECTIVES, INFO.PERSPECTIVETABLES, INFO.PERSPECTIVECOLUMNS, INFO.PERSPECTIVEHIERARCHIES, INFO.PERSPECTIVEMEASURES |
| Calendars | INFO.CALENDARS, INFO.CALENDARCOLUMNGROUPS, INFO.CALENDARCOLUMNREFERENCES |
| Cultures | INFO.CULTURES |
| Object translations | INFO.OBJECTTRANSLATIONS |
| Functions | INFO.USERDEFINEDFUNCTIONS |
| Dependencies / lineage | INFO.DEPENDENCIES, INFO.CHANGEDPROPERTIES, INFO.EXCLUDEDARTIFACTS |
| Storage internals / size | INFO.STORAGEFOLDERS, INFO.STORAGEFILES, INFO.TABLESTORAGES, INFO.COLUMNSTORAGES, INFO.PARTITIONSTORAGES, INFO.SEGMENTMAPSTORAGES, INFO.DICTIONARYSTORAGES, INFO.COLUMNPARTITIONSTORAGES, INFO.SEGMENTSTORAGES, INFO.RELATIONSHIPSTORAGES, INFO.RELATIONSHIPINDEXSTORAGES, INFO.ATTRIBUTEHIERARCHYSTORAGES, INFO.HIERARCHYSTORAGES, INFO.GENERALSEGMENTMAPSEGMENTMETADATASTORAGES, INFO.DELTATABLEMETADATASTORAGES, INFO.PARQUETFILESTORAGES, INFO.STORAGETABLES, INFO.STORAGETABLECOLUMNS, INFO.STORAGETABLECOLUMNSEGMENTS |
Use the FabricIQ MCP server tools directly — call them as MCP tool invocations:
| Parameter | Description |
|-----------|-------------|
| artifactId | GUID of the target semantic model |
| daxQueries | Array of 1–4 DAX queries (each must contain a single EVALUATE statement) |
| maxRows | Optional. Default 250, max 1,000 rows per query |
DiscoverArtifacts (MCP tool) with searchQuery set to the model name and artifactTypes: ["SemanticModel"].az rest) — list items of type SemanticModel in the workspace and filter by displayName.Call the ExecuteQuery MCP tool directly:
ExecuteQuery(
artifactId = "<SEMANTIC_MODEL_GUID>",
daxQueries = ["EVALUATE SUMMARIZECOLUMNS(...)"]
)
Call GetSemanticModelSchema(artifactId = "<SEMANTIC_MODEL_GUID>") to retrieve table/column/measure definitions before writing DAX.
ExecuteQuery is not available in the active tool list.ExecuteQuery is exposed.INFO.* fail with authorization or privilege-related errors.INFO.* functions require elevated semantic model permissions beyond standard read access.INFO.VIEW.* functions for read-oriented discovery.INFO.VIEW.* and INFO.* queries return broad object/property surfaces that are often unnecessary for the current task.INFO DAX functions to retrieve role memberships
INFO.ROLEMEMBERSHIPS() returns empty or incomplete results.INFO functions cannot reliably surface them.For the full query catalog (including dependency patterns), see discovery-queries.md.
EVALUATE
INFO.VIEW.TABLES()
ORDER BY [Name]
DEFINE
MEASURE 'Sales'[Total Sales] = SUM('Sales'[Amount])
EVALUATE
SUMMARIZECOLUMNS(
'Customer'[Customer Name],
"Total Sales", [Total Sales]
)
ORDER BY [Total Sales] DESC
development
Build a guided requirements-to-implementation workflow for new Power BI reports and dashboards from semantic models, datasets, or PBIP projects. Use when the user wants to: (1) plan then implement a report, (2) define audience, scope, page plan, design direction, dependencies, and delivery target, (3) create a locked report spec with approval before PBIR authoring. For direct edits to existing report files, use `powerbi-report-authoring`. For design-only critique or redesign, use `powerbi-report-design`. Triggers: "build me a dashboard", "create a new report", "plan then implement", "define and build Power BI report", "walk me through creating a report".
tools
Manage Power BI report workspace items in Microsoft Fabric via `az rest` CLI against the Fabric REST API. Use when the user wants to: (1) create reports from PBIR definitions, (2) get or download report definitions, (3) update report definitions or properties, (4) list workspace reports, (5) delete reports. For report layout authoring (pages, visuals, filters, formatting), use `powerbi-report-authoring`. Triggers: upload Power BI report, download PBIR definition, publish Power BI report to Fabric, manage Power BI reports.
development
Generate Power BI report visual design guidance before PBIR files are written. Use when the user wants to: (1) choose tone, signature, page archetypes, chart types, layout, color, typography, theme direction, or accessibility approach, (2) redesign/restyle an existing report, apply a brand, or critique chart/layout choices, (3) produce a design contract for `powerbi-report-authoring`. For end-to-end requirements, approval, and build sequencing, use `powerbi-report-planning`. Triggers: "design Power BI report", "make dashboard look professional", "choose chart type", "apply brand to report", "redesign report", "create design brief".
tools
Create and modify Power BI report files in PBIR/PBIP format using the `powerbi-report-author` and `powerbi-desktop` CLIs. Use when the user wants to: (1) implement an approved report spec or design brief, (2) add or edit pages, visuals, filters, slicers, bookmarks, themes, or formatting, (3) validate PBIR and verify rendering in Power BI Desktop. For open-ended visual design, use `powerbi-report-design` first. For end-to-end requirements and approval workflow, use `powerbi-report-planning` first. Triggers: "edit PBIR", "create Power BI report page", "add visual to PBIP", "format report visual", "validate Power BI report", "reload Desktop screenshot", "implement an approved PBIP report spec", "edit PBIR pages/visuals".