Power BI Modeling

Power BI Modeling

Guides an AI agent in building optimized Power BI semantic models: star schemas, DAX measures, relationships, row-level security, naming and performance, after inspecting the live model via MCP.

Skill files6 files

references/

SKILL.md154 lines
1
---
2
name: powerbi-modeling
3
description: 'Power BI semantic modeling assistant for building optimized data models. Use when working with Power BI semantic models, creating measures, designing star schemas, configuring relationships, implementing RLS, or optimizing model performance. Triggers on queries about DAX calculations, table relationships, dimension/fact table design, naming conventions, model documentation, cardinality, cross-filter direction, calculation groups, and data model best practices. Always connects to the active model first using power-bi-modeling MCP tools to understand the data structure before providing guidance.'
4
---
5
6
# Power BI Semantic Modeling
7
8
Guide users in building optimized, well-documented Power BI semantic models following Microsoft best practices.
9
10
## When to Use This Skill
11
12
Use this skill when users ask about:
13
- Creating or optimizing Power BI semantic models
14
- Designing star schemas (dimension/fact tables)
15
- Writing DAX measures or calculated columns
16
- Configuring table relationships (cardinality, cross-filter)
17
- Implementing row-level security (RLS)
18
- Naming conventions for tables, columns, measures
19
- Adding descriptions and documentation to models
20
- Performance tuning and optimization
21
- Calculation groups and field parameters
22
- Model validation and best practice checks
23
24
**Trigger phrases:** "create a measure", "add relationship", "star schema", "optimize model", "DAX formula", "RLS", "naming convention", "model documentation", "cardinality", "cross-filter"
25
26
## Prerequisites
27
28
### Required Tools
29
- **Power BI Modeling MCP Server**: Required for connecting to and modifying semantic models
30
- Enables: connection_operations, table_operations, measure_operations, relationship_operations, etc.
31
- Must be configured and running to interact with models
32
33
### Optional Dependencies
34
- **Microsoft Learn MCP Server**: Recommended for researching latest best practices
35
- Enables: microsoft_docs_search, microsoft_docs_fetch
36
- Use for complex scenarios, new features, and official documentation
37
38
## Workflow
39
40
### 1. Connect and Analyze First
41
42
Before providing any modeling guidance, always examine the current model state:
43
44
```
45
1. List connections: connection_operations(operation: "ListConnections")
46
2. If no connection, check for local instances: connection_operations(operation: "ListLocalInstances")
47
3. Connect to the model (Desktop or Fabric)
48
4. Get model overview: model_operations(operation: "Get")
49
5. List tables: table_operations(operation: "List")
50
6. List relationships: relationship_operations(operation: "List")
51
7. List measures: measure_operations(operation: "List")
52
```
53
54
### 2. Evaluate Model Health
55
56
After connecting, assess the model against best practices:
57
58
- **Star Schema**: Are tables properly classified as dimension or fact?
59
- **Relationships**: Correct cardinality? Minimal bidirectional filters?
60
- **Naming**: Human-readable, consistent naming conventions?
61
- **Documentation**: Do tables, columns, measures have descriptions?
62
- **Measures**: Explicit measures for key calculations?
63
- **Hidden Fields**: Are technical columns hidden from report view?
64
65
### 3. Provide Targeted Guidance
66
67
Based on analysis, guide improvements using references:
68
- Star schema design: See [STAR-SCHEMA.md](references/STAR-SCHEMA.md)
69
- Relationship configuration: See [RELATIONSHIPS.md](references/RELATIONSHIPS.md)
70
- DAX measures and naming: See [MEASURES-DAX.md](references/MEASURES-DAX.md)
71
- Performance optimization: See [PERFORMANCE.md](references/PERFORMANCE.md)
72
- Row-level security: See [RLS.md](references/RLS.md)
73
74
## Quick Reference: Model Quality Checklist
75
76
| Area | Best Practice |
77
|------|--------------|
78
| Tables | Clear dimension vs fact classification |
79
| Naming | Human-readable: `Customer Name` not `CUST_NM` |
80
| Descriptions | All tables, columns, measures documented |
81
| Measures | Explicit DAX measures for business metrics |
82
| Relationships | One-to-many from dimension to fact |
83
| Cross-filter | Single direction unless specifically needed |
84
| Hidden fields | Hide technical keys, IDs from report view |
85
| Date table | Dedicated marked date table |
86
87
## MCP Tools Reference
88
89
Use these Power BI Modeling MCP operations:
90
91
| Operation Category | Key Operations |
92
|-------------------|----------------|
93
| `connection_operations` | Connect, ListConnections, ListLocalInstances, ConnectFabric |
94
| `model_operations` | Get, GetStats, ExportTMDL |
95
| `table_operations` | List, Get, Create, Update, GetSchema |
96
| `column_operations` | List, Get, Create, Update (descriptions, hidden, format) |
97
| `measure_operations` | List, Get, Create, Update, Move |
98
| `relationship_operations` | List, Get, Create, Update, Activate, Deactivate |
99
| `dax_query_operations` | Execute, Validate |
100
| `calculation_group_operations` | List, Create, Update |
101
| `security_role_operations` | List, Create, Update, GetEffectivePermissions |
102
103
## Common Tasks
104
105
### Add Measure with Description
106
```
107
measure_operations(
108
operation: "Create",
109
definitions: [{
110
name: "Total Sales",
111
tableName: "Sales",
112
expression: "SUM(Sales[Amount])",
113
formatString: "$#,##0",
114
description: "Sum of all sales amounts"
115
}]
116
)
117
```
118
119
### Update Column Description
120
```
121
column_operations(
122
operation: "Update",
123
definitions: [{
124
tableName: "Customer",
125
name: "CustomerKey",
126
description: "Unique identifier for customer dimension",
127
isHidden: true
128
}]
129
)
130
```
131
132
### Create Relationship
133
```
134
relationship_operations(
135
operation: "Create",
136
definitions: [{
137
fromTable: "Sales",
138
fromColumn: "CustomerKey",
139
toTable: "Customer",
140
toColumn: "CustomerKey",
141
crossFilteringBehavior: "OneDirection"
142
}]
143
)
144
```
145
146
## When to Use Microsoft Learn MCP
147
148
Research current best practices using `microsoft_docs_search` for:
149
- Latest DAX function documentation
150
- New Power BI features and capabilities
151
- Complex modeling scenarios (SCD Type 2, many-to-many)
152
- Performance optimization techniques
153
- Security implementation patterns
154

© GitHub, Inc. · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 13,227 prompts

More by @OpenSourceBuffGuy

See all
Schoolgirl bullied in library turns supernatural fighter prompt image

Schoolgirl bullied in library turns supernatural fighter

Directs a 30-second live-action Korean supernatural fight scene in a school library, with timed beats, dialogue, air-burst martial arts effects and a physics lock.

video-prompt, martial-arts, action, horror, gothic, visual-effects, transformation, timed-beats, multi-shot, handheld, lip-sync, photorealistic, cinematic, reference-image, face-reference, character-consistency, korea, camera-movement, guardrails, seedance, long-form

Prototyping Methodology Expert prompt image

Prototyping Methodology Expert

Recommends the right prototyping method and fidelity for your idea, with a build plan, user testing protocol and iteration criteria to validate assumptions.

system-prompt, expert-advice, innovation, startup, product-management, user-research, ui-ux, planner, for-founders, for-product-managers, for-designers, xml-tags, guided-interview, structured-output, agile, estimation, risk-management, iterative-refinement, consulting, long-form, prototyping

Product Design Journal Spec Sheet Layout prompt image

Product Design Journal Spec Sheet Layout

Turns an uploaded product photo into a design-journal page with a lifestyle hero shot above, plus technical line drawings and material swatches below.

image-prompt, nano-banana, json-prompt, reference-image, product-photography, editorial, architectural-rendering, mockup, packaging-design, natural-light, muted-colors, minimalist, vertical-format, luxury, for-designers, for-online-sellers, for-marketers, structured-output, guardrails, long-form, advanced, infographic

Reviews

Loading reviews…

Discussion

Loading comments…