/power-bi-partitions
Manage Power BI table partitions, named expressions (M/Power Query data sources), and calendar table configuration using pbi-cli. Invoke this skill whenever the user mentions "partitions", "data sources", "M expressions", "Power Query", "incremental refresh", "named
$ npx -y skills add MinaSaad1/pbi-cli --skill power-bi-partitions --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/power-bi-partitions
Context preview
The summary Claude sees to decide when to auto-load this skill.
Manage Power BI table partitions, named expressions (M/Power Query data sources), and calendar table configuration using pbi-cli. Invoke this skill whenever the user mentions "partitions", "data sources", "M expressions", "Power Query", "incremental refresh", "named
SKILL.md
power-bi-partitions.SKILL.mdname: Power BI Partitions & Expressions
description: Manage Power BI table partitions, named expressions (M/Power Query data sources), and calendar table configuration using pbi-cli. Invoke this skill whenever the user mentions "partitions", "data sources", "M expressions", "Power Query", "incremental refresh", "named expressions", "connection parameters", or wants to configure how tables load data. For broader modeling tasks (measures, relationships, hierarchies), see power-bi-modeling instead.
tools: pbi-cli
Power BI Partitions & Expressions Skill
Manage table partitions, named expressions (M queries), and calendar tables.
Prerequisites
pipx install pbi-cli-tool
pbi-cli skills install
pbi connect
Partitions
Partitions define how data is loaded into a table. Each table has at least one partition.
# List partitions in a table
pbi partition list --table Sales
pbi --json partition list --table Sales
# Create a partition with an M expression
pbi partition create "Sales_2024" --table Sales \
--expression "let Source = Sql.Database(\"server\", \"db\"), Sales = Source{[Schema=\"dbo\",Item=\"Sales\"]}[Data], Filtered = Table.SelectRows(Sales, each [Year] = 2024) in Filtered" \
--mode Import
# Create a partition with DirectQuery mode
pbi partition create "Sales_Live" --table Sales --mode DirectQuery
# Delete a partition
pbi partition delete "Sales_Old" --table Sales
# Refresh a specific partition
pbi partition refresh "Sales_2024" --table SalesNamed Expressions
Named expressions are shared M/Power Query definitions used as data sources or reusable query logic.
# List all named expressions
pbi expression list
pbi --json expression list
# Get a specific expression
pbi expression get "ServerURL"
pbi --json expression get "ServerURL"
# Create a named expression (M query)
pbi expression create "ServerURL" \
--expression '"https://api.example.com/data"' \
--description "API endpoint for data refresh"
# Create a parameterized data source
pbi expression create "DatabaseServer" \
--expression '"sqlserver.company.com"' \
--description "Production database server name"
# Delete a named expression
pbi expression delete "OldSource"
Calendar Tables
Calendar/date tables enable time intelligence in DAX. Mark a table as a date table to unlock functions like TOTALYTD, SAMEPERIODLASTYEAR, etc.
# List all calendar/date tables
pbi calendar list
pbi --json calendar list
# Mark a table as a calendar table
pbi calendar mark Calendar --date-column Date
# Alternative: use the table command
pbi table mark-date Calendar --date-column Date
Workflow: Set Up Partitioned Table
# 1. Create a table
pbi table create Sales --mode Import
# 2. Create partitions for different date ranges
pbi partition create "Sales_2023" --table Sales \
--expression "let Source = ... in Filtered2023" \
--mode Import
pbi partition create "Sales_2024" --table Sales \
--expression "let Source = ... in Filtered2024" \
--mode Import
# 3. Refresh specific partitions
pbi partition refresh "Sales_2024" --table Sales
# 4. Verify partitions
pbi --json partition list --table Sales
Workflow: Manage Data Sources
# 1. List current data source expressions
pbi --json expression list
# 2. Create shared connection parameters
pbi expression create "ServerName" \
--expression '"prod-sql-01.company.com"' \
--description "Production SQL Server"
pbi expression create "DatabaseName" \
--expression '"SalesDB"' \
--description "Production database"
# 3. Verify
pbi --json expression list
Best Practices
- Use partitions for large tables to enable incremental refresh
- Refresh only the partitions that have new data (`pbi partition refresh`)
- Use named expressions for shared connection parameters (server names, URLs)
- Always mark calendar tables with `pbi calendar mark` for time intelligence
- Use `--json` output for scripted partition management
- Export model as TMDL to version-control partition definitions: `pbi database export-tmdl ./model/`
Read more
name: Power BI Partitions & Expressions description: Manage Power BI table partitions, named expressions (M/Power Query data sources), and calendar table configuration using pbi-cli. Invoke this skill whenever the user mentions "partitions", "data sources", "M expressions", "Power Query", "incremental refresh", "named expressions", "connection parameters", or wants to configure how tables load data. For broader modeling tasks (measures, relationships, hierarchies), see power-bi-modeling instead. tools: pbi-cli
Power BI Partitions & Expressions Skill
Manage table partitions, named expressions (M queries), and calendar tables.
Prerequisites
pipx install pbi-cli-tool pbi-cli skills install pbi connect
Partitions
Partitions define how data is loaded into a table. Each table has at least one partition.
# List partitions in a table
pbi partition list --table Sales
pbi --json partition list --table Sales
# Create a partition with an M expression
pbi partition create "Sales_2024" --table Sales \
--expression "let Source = Sql.Database(\"server\", \"db\"), Sales = Source{[Schema=\"dbo\",Item=\"Sales\"]}[Data], Filtered = Table.SelectRows(Sales, each [Year] = 2024) in Filtered" \
--mode Import
# Create a partition with DirectQuery mode
pbi partition create "Sales_Live" --table Sales --mode DirectQuery
# Delete a partition
pbi partition delete "Sales_Old" --table Sales
# Refresh a specific partition
pbi partition refresh "Sales_2024" --table SalesNamed Expressions
Named expressions are shared M/Power Query definitions used as data sources or reusable query logic.
# List all named expressions pbi expression list pbi --json expression list # Get a specific expression pbi expression get "ServerURL" pbi --json expression get "ServerURL" # Create a named expression (M query) pbi expression create "ServerURL" \ --expression '"https://api.example.com/data"' \ --description "API endpoint for data refresh" # Create a parameterized data source pbi expression create "DatabaseServer" \ --expression '"sqlserver.company.com"' \ --description "Production database server name" # Delete a named expression pbi expression delete "OldSource"
Calendar Tables
Calendar/date tables enable time intelligence in DAX. Mark a table as a date table to unlock functions like TOTALYTD, SAMEPERIODLASTYEAR, etc.
# List all calendar/date tables pbi calendar list pbi --json calendar list # Mark a table as a calendar table pbi calendar mark Calendar --date-column Date # Alternative: use the table command pbi table mark-date Calendar --date-column Date
Workflow: Set Up Partitioned Table
# 1. Create a table pbi table create Sales --mode Import # 2. Create partitions for different date ranges pbi partition create "Sales_2023" --table Sales \ --expression "let Source = ... in Filtered2023" \ --mode Import pbi partition create "Sales_2024" --table Sales \ --expression "let Source = ... in Filtered2024" \ --mode Import # 3. Refresh specific partitions pbi partition refresh "Sales_2024" --table Sales # 4. Verify partitions pbi --json partition list --table Sales
Workflow: Manage Data Sources
# 1. List current data source expressions pbi --json expression list # 2. Create shared connection parameters pbi expression create "ServerName" \ --expression '"prod-sql-01.company.com"' \ --description "Production SQL Server" pbi expression create "DatabaseName" \ --expression '"SalesDB"' \ --description "Production database" # 3. Verify pbi --json expression list
Best Practices
- Use partitions for large tables to enable incremental refresh
- Refresh only the partitions that have new data (`pbi partition refresh`)
- Use named expressions for shared connection parameters (server names, URLs)
- Always mark calendar tables with `pbi calendar mark` for time intelligence
- Use `--json` output for scripted partition management
- Export model as TMDL to version-control partition definitions: `pbi database export-tmdl ./model/`
Power BI CLI - semantic models (.NET TOM) and PBIR reports for token-efficient AI agent usage, built for Claude Code
Repo: MinaSaad1/pbi-cli
Other skills on pbi-cli.
- /power-bi-custom-visuals
Vibe-code Power BI custom visuals end-to-end: scaffold a TypeScript project, iterate on src/visual.ts and capabilities.json, validate with the Power BI Visuals SDK toolchain, package to .pbiviz, and import into a PBIR report. Invoke this skill whenever the user mentions "custom
Open skill - /power-bi-dax
Write, execute, and optimize DAX queries and measures for Power BI semantic models using pbi-cli. Invoke this skill whenever the user mentions DAX, queries data in Power BI, writes calculations, creates measures, asks about EVALUATE, SUMMARIZECOLUMNS, CALCULATE, time
Open skill - /power-bi-deployment
Import and export TMDL/TMSL formats, manage model lifecycle with transactions, and version-control Power BI semantic models using pbi-cli. Invoke this skill whenever the user mentions "deploy", "export", "import", "TMDL", "TMSL", "version control", "git", "backup", "migrate",
Open skill - /power-bi-diagnostics
Troubleshoot Power BI model performance, trace query execution, manage caches, and verify the pbi-cli environment using pbi-cli. Invoke this skill whenever the user says "pbi not working", "setup issues", "connection failed", "slow query", "performance", "profiling", "tracing",
Open skill - /power-bi-docs
Auto-document Power BI semantic models by extracting metadata, generating documentation, and cataloging all model objects using pbi-cli. Invoke this skill whenever the user says "document this model", "what's in this model", "list everything", "data dictionary", "model
Open skill - /power-bi-filters
Add, remove, and manage page-level and visual-level filters on Power BI PBIR reports using pbi-cli. Invoke this skill whenever the user mentions "filter", "TopN filter", "top 10", "bottom 5", "relative date filter", "last 30 days", "categorical filter", "include values",
Open skill

