agentleFS
korchard333korchard333/claude-power-platform-community/.claude/skills/power-bi/SKILL.md

power-bi

Skill46 starsChanged 8 months agoMITView on GitHub

Power BI Development. Use when: building reports, TMDL semantic models, DAX patterns, PBIR report definitions, Fabric REST API, Direct Lake, incremental refresh, Dataverse as data source, Power BI Embedded in Code Apps, CI/CD for Power BI.

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 8 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always create a dedicated Date table (don't rely on auto date/time)

    line 70
  2. Distinctive:

    Use star schema: fact tables at center, dimension tables around

    line 71
  3. Distinctive:

    Use folders to organize measures by business domain

    line 74
  4. Very specific:

    Use variables (VAR ... RETURN) for readability and performance

    line 78
  5. Very specific:

    Use DIVIDE() instead of / (handles division by zero)

    line 79
  6. Very specific:

    Use BLANK() not 0 for missing values

    line 80
  7. Very specific:

    Avoid FILTER(table, ...) when column filter works — use KEEPFILTERS or VALUES

    line 81
  8. Very specific:

    Never use CALCULATE with row context unless you understand context transition

    line 82
  9. Distinctive:

    Use bookmarks for showing/hiding visual states instead of multiple pages

    line 86
  10. Distinctive:

    Use drill-through for detail pages, not separate reports

    line 88
  11. Distinctive:

    Test with Row-Level Security using "View As" in Power BI Service

    line 89
  12. Distinctive:

    Import mode on large Dataverse tables without incremental refresh

    line 99
  13. Distinctive:

    Not testing refresh after deployment (connection strings, credentials)

    line 104

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill: Power BI Development

When to Use

Trigger when building Power BI semantic models, reports, DAX measures, or managing Power BI via Fabric REST APIs. Covers TMDL/model.bim semantic model definitions, PBIR report definitions, DAX patterns, and deployment automation.


Architecture Overview

Power BI Project Structure (PBIP Format)

MyReport.pbip                    # Project file
├── MyReport.SemanticModel/
│   ├── definition/
│   │   ├── model.tmdl           # TMDL format (modern, human-readable)
│   │   ├── tables/
│   │   │   ├── Sales.tmdl       # Table definitions with columns, measures
│   │   │   ├── Date.tmdl
│   │   │   └── Product.tmdl
│   │   ├── relationships.tmdl   # All relationships
│   │   ├── expressions.tmdl     # M/Power Query expressions
│   │   ├── cultures/
│   │   │   └── en-US.tmdl       # Translations
│   │   └── roles/
│   │       └── RegionRLS.tmdl   # Row-level security
│   ├── definition.pbism         # Semantic model metadata
│   └── .platform
│
├── MyReport.Report/
│   ├── definition/
│   │   ├── report.json          # Report definition
│   │   ├── pages/
│   │   │   ├── page1/
│   │   │   │   ├── page.json    # Page config
│   │   │   │   └── visuals/
│   │   │   │       ├── visual1.json
│   │   │   │       └── visual2.json
│   │   ├── bookmarks/           # Report bookmarks
│   │   └── theme.json           # Report theme
│   ├── definition.pbir          # Report metadata
│   └── .platform

⚠️ REQUIRED: Load Sub-Files Before Implementation

SKILL.md is a summary only — it is NOT sufficient for implementation.

The detailed content (complete payloads, XML templates, working examples, edge-case handling) lives in sub-files in the same directory as this SKILL.md. Before writing any code, you MUST use read_file on the sub-files relevant to your task:

  • TMDL — table definitions, columns, measures, partitions, Date table pattern, relationships, row-level security
  • DAX Patterns — time intelligence, ranking, KPIs, field parameters, CALCULATE context patterns
  • PBIR Report Definition — page.json, visual.json, theme definition
  • Fabric REST API — authentication, workspace management, dataset operations, report operations, deployment pipeline
  • Direct Lake & Incremental Refresh — Direct Lake mode, storage mode selection, incremental refresh setup
  • Dataverse as Data Source — Power Query M connection, TDS endpoint SQL access
  • Power BI Embedded — embed token generation, React integration for Code Apps
  • CI/CD — GitHub Actions pipeline for automated deployment

Best Practices

Semantic Model

  • Always create a dedicated Date table (don't rely on auto date/time)
  • Use star schema: fact tables at center, dimension tables around
  • Hide foreign key columns from report view
  • Set summarizeBy: none on non-additive columns (IDs, codes)
  • Use folders to organize measures by business domain
  • Format strings on all measures (currency, %, number)

DAX

  • Use variables (VAR ... RETURN) for readability and performance
  • Use DIVIDE() instead of / (handles division by zero)
  • Use BLANK() not 0 for missing values
  • Avoid FILTER(table, ...) when column filter works — use KEEPFILTERS or VALUES
  • Never use CALCULATE with row context unless you understand context transition

Reports

  • Maximum 8-10 visuals per page
  • Use bookmarks for showing/hiding visual states instead of multiple pages
  • Apply consistent theme across all reports
  • Use drill-through for detail pages, not separate reports
  • Test with Row-Level Security using "View As" in Power BI Service

Anti-Patterns

  • Auto date/time enabled (creates hidden tables, bloats model)
  • Bidirectional cross-filtering (causes ambiguity, performance issues)
  • Too many measures without folders (unnavigable model)
  • CALCULATE(COUNTROWS(...)) when COUNTROWS alone works
  • Import mode on large Dataverse tables without incremental refresh
  • Publishing .pbix files directly instead of using deployment pipelines
  • Hardcoding server/database names instead of using parameters
  • Missing RLS when multiple business units access the same report
  • Calculated columns for values that should be measures
  • Not testing refresh after deployment (connection strings, credentials)

Note: Power BI Dashboards and Datasets are NOT supported in Power Platform Pipelines. Use Power BI's own deployment pipelines (Fabric REST API) for Power BI content promotion.


Related Skills

  • dataverse — Dataverse as a Power BI data source
  • code-apps — Embedding Power BI in Code Apps

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.