Power-Bi-Data-Modeling-Best-Practices
Power-Bi-Data-Modeling-Best-Practices是一款data方向的AI技能,核心价值是Comprehensive Power BI data modeling best practices based on Microsoft guidance for creating efficient, scalable, and maintainable semantic models using star schema principles,可用于解决开发者在data领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。
Comprehensive Power BI data modeling best practices based on Microsoft guidance for creating efficient, scalable, and maintainable semantic models using star schema principles.
mkdir -p ./skills/power-bi-data-modeling-best-practices && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/power-bi-data-modeling-best-practices/SKILL.md -o ./skills/power-bi-data-modeling-best-practices/SKILL.md Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).
Skill Content
# Power BI Data Modeling Best Practices
Overview
This document provides comprehensive instructions for designing efficient, scalable, and maintainable Power BI semantic models following Microsoft's official guidance and dimensional modeling best practices.
Star Schema Design Principles
1. Fundamental Table Types
**Dimension Tables** - Store descriptive business entities:
- Products, customers, geography, time, employees
- Contain unique key columns (preferably surrogate keys)
- Relatively small number of rows
- Used for filtering, grouping, and providing context
- Support hierarchical drill-down scenarios
**Fact Tables** - Store measurable business events:
- Sales transactions, website clicks, manufacturing events
- Contain foreign keys to dimension tables
- Numeric measures for aggregation
- Large number of rows (typically growing over time)
- Represent specific grain/level of detail
Example Star Schema Structure:
DimProduct (Dimension) FactSales (Fact) DimCustomer (Dimension)
├── ProductKey (PK) ├── SalesKey (PK) ├── CustomerKey (PK)
├── ProductName ├── ProductKey (FK) ├── CustomerName
├── Category ├── CustomerKey (FK) ├── CustomerType
├── SubCategory ├── DateKey (FK) ├── Region
└── UnitPrice ├── SalesAmount └── RegistrationDate
├── Quantity
DimDate (Dimension) └── DiscountAmount
├── DateKey (PK)
├── Date
├── Year
├── Quarter
├── Month
└── DayOfWeek2. Table Design Best Practices
#### Dimension Table Design
✅ DO:
- Use surrogate keys (auto-incrementing integers) as primary keys
- Include business keys for integration purposes
- Create hierarchical attributes (Category > SubCategory > Product)
- Use descriptive names and proper data types
- Include "Unknown" records for missing dimension data
- Keep dimension tables relatively narrow (focused attributes)
❌ DON'T:
- Use natural business keys as primary keys in large models
- Mix fact and dimension characteristics in same table
- Create unnecessarily wide dimension tables
- Leave missing values without proper handling#### Fact Table Design
✅ DO:
- Store data at the most granular level needed
- Use foreign keys that match dimension table keys
- Include only numeric, measurable columns
- Maintain consistent grain across all fact table rows
- Use appropriate data types (decimal for currency, integer for counts)
❌ DON'T:
- Include descriptive text columns (these belong in dimensions)
- Mix different grains in the same fact table
- Store calculated values that can be computed at query time
- Use composite keys when surrogate keys would be simplerRelationship Design and Management
1. Relationship Types and Best Practices
#### One-to-Many Relationships (Standard Pattern)
Configuration:
- From Dimension (One side) to Fact (Many side)
- Single direction filtering (Dimension filters Fact)
- Mark as "Assume Referential Integrity" for DirectQuery performance
Example:
DimProduct (1) ← ProductKey → (*) FactSales
DimCustomer (1) ← CustomerKey → (*) FactSales
DimDate (1) ← DateKey → (*) FactSales#### Many-to-Many Relationships (Use Sparingly)
When to Use:
✅ Genuine many-to-many business relationships
✅ When bridging table pattern is not feasible
✅ For advanced analytical scenarios
Best Practices:
- Create explicit bridging tables when possible
- Use low-cardinality relationship columns
- Monitor performance impact carefully
- Document business rules clearly
Example with Bridging Table:
DimCustomer (1) ← CustomerKey → (*) BridgeCustomerAccount (*) ← AccountKey → (1) DimAccount#### One-to-One Relationships (Rare)
When to Use:
- Extending dimension tables with additional attributes
- Degenerate dimension scenarios
- Separating PII from operational data
Implementation:
- Consider consolidating into single ta🎯 Best For
- UI designers
- Product designers
- Claude users
- GitHub Copilot users
- Data professionals
💡 Use Cases
- Generating component mockups
- Creating design system tokens
- Data pipeline auditing
- Query optimization
📖 How to Use This Skill
- 1
Install the Skill
Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.
- 2
Load into Your AI Assistant
Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.
- 3
Apply Power-Bi-Data-Modeling-Best-Practices to Your Work
Provide context for your task — paste source material, describe your audience, or share existing work to guide the AI.
- 4
Review and Refine
Edit the AI output for accuracy, tone, and completeness. Add human insight where the AI lacks context.
❓ Frequently Asked Questions
Does this work with Figma?
Some design skills integrate with Figma plugins. Check the Works With section for supported tools.
How do I install Power-Bi-Data-Modeling-Best-Practices?
Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/power-bi-data-modeling-best-practices/SKILL.md, ready to use.
Can I customize this skill for my team?
Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.
⚠️ Common Mistakes to Avoid
Skipping usability testing
AI-generated designs should be validated with real users before development.
Ignoring data quality
AI analysis inherits all data quality issues — profile your data first.