powerbi-modeling
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePower BI Semantic Modeling
Power BI语义建模
Guide users in building optimized, well-documented Power BI semantic models following Microsoft best practices.
遵循Microsoft最佳实践,指导用户构建经过优化、文档完善的Power BI语义模型。
When to Use This Skill
何时使用此技能
Use this skill when users ask about:
- Creating or optimizing Power BI semantic models
- Designing star schemas (dimension/fact tables)
- Writing DAX measures or calculated columns
- Configuring table relationships (cardinality, cross-filter)
- Implementing row-level security (RLS)
- Naming conventions for tables, columns, measures
- Adding descriptions and documentation to models
- Performance tuning and optimization
- Calculation groups and field parameters
- Model validation and best practice checks
Trigger phrases: "create a measure", "add relationship", "star schema", "optimize model", "DAX formula", "RLS", "naming convention", "model documentation", "cardinality", "cross-filter"
当用户询问以下内容时,使用此技能:
- 创建或优化Power BI语义模型
- 设计星型架构(维度/事实表)
- 编写DAX度量值或计算列
- 配置表关系(基数、交叉筛选)
- 实施行级安全性(RLS)
- 表、列、度量值的命名规范
- 为模型添加描述和文档
- 性能调优与优化
- 计算组和字段参数
- 模型验证与最佳实践检查
触发短语:"创建度量值"、"添加关系"、"星型架构"、"优化模型"、"DAX公式"、"RLS"、"命名规范"、"模型文档"、"基数"、"交叉筛选"
Prerequisites
前提条件
Required Tools
必备工具
- Power BI Modeling MCP Server: Required for connecting to and modifying semantic models
- Enables: connection_operations, table_operations, measure_operations, relationship_operations, etc.
- Must be configured and running to interact with models
- Power BI Modeling MCP Server:连接和修改语义模型的必备工具
- 支持:connection_operations、table_operations、measure_operations、relationship_operations等操作
- 必须配置并运行才能与模型交互
Optional Dependencies
可选依赖
- Microsoft Learn MCP Server: Recommended for researching latest best practices
- Enables: microsoft_docs_search, microsoft_docs_fetch
- Use for complex scenarios, new features, and official documentation
- Microsoft Learn MCP Server:建议用于研究最新最佳实践
- 支持:microsoft_docs_search、microsoft_docs_fetch
- 适用于复杂场景、新功能和官方文档查询
Workflow
工作流程
1. Connect and Analyze First
1. 先连接并分析
Before providing any modeling guidance, always examine the current model state:
1. List connections: connection_operations(operation: "ListConnections")
2. If no connection, check for local instances: connection_operations(operation: "ListLocalInstances")
3. Connect to the model (Desktop or Fabric)
4. Get model overview: model_operations(operation: "Get")
5. List tables: table_operations(operation: "List")
6. List relationships: relationship_operations(operation: "List")
7. List measures: measure_operations(operation: "List")在提供任何建模指导前,务必先检查当前模型状态:
1. 列出连接:connection_operations(operation: "ListConnections")
2. 若无连接,检查本地实例:connection_operations(operation: "ListLocalInstances")
3. 连接到模型(Desktop或Fabric版本)
4. 获取模型概览:model_operations(operation: "Get")
5. 列出表:table_operations(operation: "List")
6. 列出关系:relationship_operations(operation: "List")
7. 列出度量值:measure_operations(operation: "List")2. Evaluate Model Health
2. 评估模型健康状况
After connecting, assess the model against best practices:
- Star Schema: Are tables properly classified as dimension or fact?
- Relationships: Correct cardinality? Minimal bidirectional filters?
- Naming: Human-readable, consistent naming conventions?
- Documentation: Do tables, columns, measures have descriptions?
- Measures: Explicit measures for key calculations?
- Hidden Fields: Are technical columns hidden from report view?
连接后,根据最佳实践评估模型:
- 星型架构:表是否正确分类为维度表或事实表?
- 关系:基数是否正确?双向筛选是否最少?
- 命名:是否为易读、一致的命名规范?
- 文档:表、列、度量值是否有描述?
- 度量值:关键计算是否使用显式度量值?
- 隐藏字段:技术列是否在报表视图中隐藏?
3. Provide Targeted Guidance
3. 提供针对性指导
Based on analysis, guide improvements using references:
- Star schema design: See STAR-SCHEMA.md
- Relationship configuration: See RELATIONSHIPS.md
- DAX measures and naming: See MEASURES-DAX.md
- Performance optimization: See PERFORMANCE.md
- Row-level security: See RLS.md
基于分析结果,参考以下内容指导改进:
- 星型架构设计:参见STAR-SCHEMA.md
- 关系配置:参见RELATIONSHIPS.md
- DAX度量值与命名:参见MEASURES-DAX.md
- 性能优化:参见PERFORMANCE.md
- 行级安全性:参见RLS.md
Quick Reference: Model Quality Checklist
快速参考:模型质量检查清单
| Area | Best Practice |
|---|---|
| Tables | Clear dimension vs fact classification |
| Naming | Human-readable: |
| Descriptions | All tables, columns, measures documented |
| Measures | Explicit DAX measures for business metrics |
| Relationships | One-to-many from dimension to fact |
| Cross-filter | Single direction unless specifically needed |
| Hidden fields | Hide technical keys, IDs from report view |
| Date table | Dedicated marked date table |
| 领域 | 最佳实践 |
|---|---|
| 表 | 清晰区分维度表与事实表 |
| 命名 | 易读性:使用 |
| 描述 | 所有表、列、度量值均有文档说明 |
| 度量值 | 针对业务指标使用显式DAX度量值 |
| 关系 | 从维度表到事实表的一对多关系 |
| 交叉筛选 | 除非特别需要,否则使用单向筛选 |
| 隐藏字段 | 在报表视图中隐藏技术键、ID |
| 日期表 | 使用专用的标记日期表 |
MCP Tools Reference
MCP工具参考
Use these Power BI Modeling MCP operations:
| Operation Category | Key Operations |
|---|---|
| Connect, ListConnections, ListLocalInstances, ConnectFabric |
| Get, GetStats, ExportTMDL |
| List, Get, Create, Update, GetSchema |
| List, Get, Create, Update (descriptions, hidden, format) |
| List, Get, Create, Update, Move |
| List, Get, Create, Update, Activate, Deactivate |
| Execute, Validate |
| List, Create, Update |
| List, Create, Update, GetEffectivePermissions |
使用以下Power BI Modeling MCP操作:
| 操作类别 | 关键操作 |
|---|---|
| Connect、ListConnections、ListLocalInstances、ConnectFabric |
| Get、GetStats、ExportTMDL |
| List、Get、Create、Update、GetSchema |
| List、Get、Create、Update(描述、隐藏、格式) |
| List、Get、Create、Update、Move |
| List、Get、Create、Update、Activate、Deactivate |
| Execute、Validate |
| List、Create、Update |
| List、Create、Update、GetEffectivePermissions |
Common Tasks
常见任务
Add Measure with Description
添加带描述的度量值
measure_operations(
operation: "Create",
definitions: [{
name: "Total Sales",
tableName: "Sales",
expression: "SUM(Sales[Amount])",
formatString: "$#,##0",
description: "Sum of all sales amounts"
}]
)measure_operations(
operation: "Create",
definitions: [{
name: "Total Sales",
tableName: "Sales",
expression: "SUM(Sales[Amount])",
formatString: "$#,##0",
description: "Sum of all sales amounts"
}]
)Update Column Description
更新列描述
column_operations(
operation: "Update",
definitions: [{
tableName: "Customer",
name: "CustomerKey",
description: "Unique identifier for customer dimension",
isHidden: true
}]
)column_operations(
operation: "Update",
definitions: [{
tableName: "Customer",
name: "CustomerKey",
description: "Unique identifier for customer dimension",
isHidden: true
}]
)Create Relationship
创建关系
relationship_operations(
operation: "Create",
definitions: [{
fromTable: "Sales",
fromColumn: "CustomerKey",
toTable: "Customer",
toColumn: "CustomerKey",
crossFilteringBehavior: "OneDirection"
}]
)relationship_operations(
operation: "Create",
definitions: [{
fromTable: "Sales",
fromColumn: "CustomerKey",
toTable: "Customer",
toColumn: "CustomerKey",
crossFilteringBehavior: "OneDirection"
}]
)When to Use Microsoft Learn MCP
何时使用Microsoft Learn MCP
Research current best practices using for:
microsoft_docs_search- Latest DAX function documentation
- New Power BI features and capabilities
- Complex modeling scenarios (SCD Type 2, many-to-many)
- Performance optimization techniques
- Security implementation patterns
使用研究当前最佳实践,适用于:
microsoft_docs_search- 最新DAX函数文档
- Power BI新功能与能力
- 复杂建模场景(如SCD Type 2、多对多关系)
- 性能优化技巧
- 安全实施模式