Skip to main content
skill CX Codex

powerbi-expert — Claude Code skill for Power BI, DAX and M

A skill that turns your agent into a Power BI specialist: DAX, M language, data modeling, Power Query and report design. Handy when measures or the model need fixing.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add personamanagmentlayer/pcl --skill powerbi-expert -a claude-code
Open on GitHub

What powerbi-expert does

The skill gives the agent a Power BI expert role. It carries rules for data modeling (star schema, a marked date table, cardinality and filter direction), DAX performance (variables, CALCULATE over iterators, COUNTROWS instead of COUNT), report design, Power Query and row-level security. A separate section lists anti-patterns as bad/good pairs: calculated columns versus measures, bidirectional relationships, repeated calculations without variables, filtering after loading everything instead of letting query folding do the work.

Reference material sits next to the skill in references/CORE_CONCEPTS.md and is read on demand: modeling, DAX fundamentals, advanced DAX, M, RLS, report design. The agent gets Read, Write, Edit, Bash, Glob and Grep, so it can open model files and edit them. You need powerbicli 3.0.0 or higher — some scenarios won't run without it.

The skill isn't tied to one editor: it installs into Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode. If your measures and M code live in a repo, the agent will follow these same rules while editing them.

What it helps with

  • lay out fact and dimension tables as a star schema
  • convert a calculated column into a measure and free up memory
  • speed up a measure with variables instead of repeated calculations
  • set up row-level security and test it with the View as feature
  • turn on query folding in Power Query instead of filtering after load

Example prompts for the agent

  • Review the sales model: relationships, cardinality and filter direction — what should change?
  • Rewrite this measure in DAX with variables and DIVIDE, and explain why it's faster
  • Set up dynamic RLS with a security table and show me how to test the role

How to install powerbi-expert

1Skills CLI (Vercel)

npx skills add personamanagmentlayer/pcl --skill powerbi-expert -a claude-code

2Manually: put the files in place

~/.claude/skills/powerbi-expert/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/powerbi-expert/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about powerbi-expert

How do I install powerbi-expert in Claude?

Run npx skills add personamanagmentlayer/pcl --skill powerbi-expert -a claude-code. The skill file lands at ~/.claude/skills/powerbi-expert/SKILL.md.

What does powerbi-expert do?

It gives the agent Power BI expertise: DAX, M language, data modeling, Power Query, row-level security and report design. It kicks in when DAX, BI or data modeling comes up.

What do I need for this skill to work?

powerbicli version 3.0.0 or higher. The skill also reads references/CORE_CONCEPTS.md on demand.

Source text

SKILL.md · Apache-2.0
---
name: powerbi-expert
version: 1.1.0
description: >-
  Expert-level Power BI, DAX, M language, data modeling, Power Query, report design, and
  paginated reports. Use when the user mentions DAX, Power Query, BI, Microsoft platforms,
  analytics, or data modeling, or when the task involves DAX Fundamentals, Advanced DAX,
  Row-Level Security, or Report Design.
category: data
author: PCL Team
license: Apache-2.0
tags:
  - powerbi
  - dax
  - power-query
  - bi
  - microsoft
  - analytics
  - data-modeling
allowed-tools:
  - Read
  - Write
  - Edit
  - Bash
  - Glob
  - Grep
requirements:
  powerbicli: '>=3.0.0'
---

# Power BI Expert

You are an expert in Power BI with deep knowledge of DAX (Data Analysis Expressions), M language (Power Query), data modeling, relationships, measures, calculated columns, row-level security, and report design. You create performant, maintainable analytical solutions in Power BI.

## Best Practices

### 1. Data Modeling

- Use star schema (fact and dimension tables)
- Create proper date table and mark it
- Set correct cardinality and filter direction
- Hide columns not needed in reports
- Create relationships on integer keys, not strings
- Avoid bidirectional relationships unless necessary

### 2. DAX Performance

- Use variables to avoid recalculation
- Prefer CALCULATE over iterators when possible
- Use COUNTROWS instead of COUNT
- Avoid calculated columns; use measures instead
- Use SELECTEDVALUE for single-value columns
- Filter on dimension tables, not fact tables

### 3. Report Design

- Limit visuals per page (5-7 optimal)
- Use bookmarks for complex navigation
- Implement drill-through for details
- Use consistent colors and formatting
- Optimize visual types for mobile
- Test performance with large datasets

### 4. Power Query

- Enable query folding when possible
- Perform filtering early in transformation
- Use parameters for reusable queries
- Disable "Include in report refresh" for reference queries
- Document custom functions
- Use native queries for complex SQL

### 5. Security

- Implement row-level security at table level
- Test RLS with "View as" feature
- Use dynamic RLS with security tables
- Document security roles
- Avoid bypassing RLS in measures

## Anti-Patterns

### 1. Calculated Columns vs Measures

```dax
// Bad: Calculated column (stored, consumes memory)
TotalRevenue = FactSales[Quantity] * FactSales[UnitPrice]

// Good: Measure (calculated on demand)
Total Revenue = SUMX(FactSales, FactSales[Quantity] * FactSales[UnitPrice])
```

### 2. Bidirectional Relationships

```dax
// Bad: Bidirectional filter on all relationships
// Can cause ambiguity and performance issues

// Good: Use specific relationships
Sales with Both Filters = CALCULATE(
    [Total Sales],
    CROSSFILTER(FactSales[ProductKey], DimProduct[ProductKey], BOTH)
)
```

### 3. Not Using Variables

```dax
// Bad: Repeated calculation
Margin % = ([Total Sales] - [Total Cost]) / [Total Sales]

// Good: Use variables
Margin % =
VAR Sales = [Total Sales]
VAR Cost = [Total Cost]
VAR Margin = Sales - Cost
RETURN DIVIDE(Margin, Sales)
```

### 4. Ignoring Query Folding

```m
// Bad: Filtering after loading all data
Source = Sql.Database("server", "database"),
AllData = Source{[Schema="dbo",Item="FactSales"]}[Data],
FilteredRows = Table.SelectRows(AllData, each [Year] = 2024)

// Good: Filter at source (query folding)
Source = Sql.Database("server", "database"),
FilteredData = Table.SelectRows(Source{[Schema="dbo",Item="FactSales"]}[Data],
    each [Year] = 2024)
```

## Reference Documentation

Detailed material lives alongside this skill and is read on demand:

- [Core Expertise](references/CORE_CONCEPTS.md) — Data Modeling, DAX Fundamentals, Advanced DAX, Power Query (M Language), Row-Level Security (RLS), Report Design

## Resources

- [Power BI Documentation](https://docs.microsoft.com/power-bi/)
- [DAX Guide](https://dax.guide/)
- [SQLBI](https://www.sqlbi.com/)
- [Power BI Community](https://community.powerbi.com/)
- [DAX Formatter](https://www.daxformatter.com/)
- [Power BI Best Practices](https://docs.microsoft.com/power-bi/guidance/)
- [M Language Reference](https://docs.microsoft.com/powerquery-m/)

© PCL Team · Apache-2.0 · personamanagmentlayer/pcl

Similar skills

All skills for Data and databases →

From the same set14

gcp-expert A skill that hands your agent working GCP examples: Cloud Functions, BigQuery, Firestore, Pub/Sub and gcloud commands. Useful when the code targets Google Cloud. CX Codex +1 547installs argocd-expert A skill that turns your agent into an ArgoCD operator: GitOps deploys, app sync, AppProject and ApplicationSet. Useful when your deployment lives in Git. CX Codex +1 509installs automotive-expert A skill that gives your agent automotive domain knowledge: connected vehicles, telemetry, ADAS, OBD-II diagnostics. Useful when the project touches fleet software or in-vehicle systems. CX Codex +1 467installs dart-expert A skill that gives your coding agent Dart and Flutter reference material: widgets, state management, async patterns. CX Codex +1 462installs education-expert Gives your agent a working frame for LMS design, assessment and learning standards. Useful when you build a course platform. CX Codex +1 428installs postgresql-expert A skill that turns the agent into a PostgreSQL expert: advanced queries, indexes, performance tuning and production operations. Useful whenever a task touches schema, SQL or query plans. CX Codex +1 424installs docker-expert A skill that gives your coding agent Docker expertise: image builds, Dockerfile cleanups, Compose setups. Useful when a container balloons or dies on boot. CX Codex +1 365installs r-expert An R skill covering statistical analysis, tidyverse data wrangling, ggplot2 charts and R Markdown reports. Useful when your project runs on R. CX Codex +1 323installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor