Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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.
.claude/skills/minasaad1-power-bi-partitions-expressions/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -29% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -9% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -56% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -52% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -51% | 0% |
Manage table partitions, named expressions (M queries), and calendar tables.
bashpipx install pbi-cli-tool pbi-cli skills install pbi connect
Partitions define how data is loaded into a table. Each table has at least one partition.
bash# 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 Sales
Named expressions are shared M/Power Query definitions used as data sources or reusable query logic.
bash# 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/date tables enable time intelligence in DAX. Mark a table as a date table to unlock functions like TOTALYTD, SAMEPERIODLASTYEAR, etc.
bash# 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
bash# 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
bash# 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
pbi partition refresh)pbi calendar mark for time intelligence--json output for scripted partition managementpbi database export-tmdl ./model/| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 14,696 | 4,610 | -69% | 1 | 1 | 0% | 2,565 | 1,832 | -29% | 0 | 0 | — |
case-02 | fail→pass | 7,186 | 2,596 | -64% | 1 | 1 | 0% | 1,523 | 1,393 | -9% | 0 | 0 | — |
case-03 | fail→pass | 17,307 | 1,951 | -89% | 1 | 1 | 0% | 2,846 | 1,251 | -56% | 0 | 0 | — |
case-04 | fail→pass | 17,149 | 2,693 | -84% | 1 | 1 | 0% | 2,735 | 1,310 | -52% | 0 | 0 | — |
case-05 | fail→pass | 13,978 | 2,110 | -85% | 1 | 1 | 0% | 2,562 | 1,252 | -51% | 0 | 0 | — |
case-06 | fail→pass | 14,465 | 2,582 | -82% | 1 | 1 | 0% | 2,496 | 1,323 | -47% | 0 | 0 | — |
case-07 | fail→pass | 12,254 | 2,131 | -83% | 1 | 1 | 0% | 2,050 | 1,224 | -40% | 0 | 0 | — |
case-08 | fail→pass | 22,115 | 1,522 | -93% | 1 | 1 | 0% | 3,858 | 1,122 | -71% | 0 | 0 | — |
case-09 | fail→pass | 10,602 | 1,733 | -84% | 1 | 1 | 0% | 1,626 | 1,152 | -29% | 0 | 0 | — |
case-10 | fail→pass | 11,566 | 1,950 | -83% | 1 | 1 | 0% | 1,808 | 1,209 | -33% | 0 | 0 | — |
case-11 | pass→pass | 14,681 | 1,541 | -90% | 1 | 1 | 0% | 2,312 | 1,117 | -52% | 0 | 0 | — |
case-12 | pass→pass | 9,633 | 2,262 | -77% | 1 | 1 | 0% | 1,767 | 1,270 | -28% | 0 | 0 | — |
case-13 | fail→pass | 13,958 | 1,906 | -86% | 1 | 1 | 0% | 2,204 | 1,193 | -46% | 0 | 0 | — |
case-14 | fail→pass | 7,287 | 2,144 | -71% | 1 | 1 | 0% | 1,179 | 1,223 | +4% | 0 | 0 | — |
case-15 | fail→pass | 12,163 | 1,363 | -89% | 1 | 1 | 0% | 2,263 | 1,070 | -53% | 0 | 0 | — |
case-16 | fail→pass | 14,870 | 2,076 | -86% | 1 | 1 | 0% | 2,491 | 1,175 | -53% | 0 | 0 | — |
case-17 | fail→pass | 10,408 | 2,883 | -72% | 1 | 1 | 0% | 2,002 | 1,449 | -28% | 0 | 0 | — |
case-18 | fail→pass | 13,065 | 1,480 | -89% | 1 | 1 | 0% | 2,265 | 1,091 | -52% | 0 | 0 | — |
case-19 | fail→pass | 12,563 | 3,089 | -75% | 1 | 1 | 0% | 1,880 | 1,427 | -24% | 0 | 0 | — |
case-20 | pass→pass | 7,548 | 4,117 | -45% | 1 | 1 | 0% | 1,446 | 1,603 | +11% | 0 | 0 | — |
case-21 | pass→pass | 12,863 | 10,210 | -21% | 1 | 1 | 0% | 2,242 | 2,659 | +19% | 0 | 0 | — |
case-22 | pass→pass | 6,393 | 3,855 | -40% | 1 | 1 | 0% | 1,047 | 1,483 | +42% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +77 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.