Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Create and manage Power BI semantic model structure using pbi-cli -- tables, columns, measures, relationships, hierarchies, calculation groups, and date/calendar tables. Invoke this skill whenever the user says "create table", "add measure", "add column", "create relationship", "date table", "calendar table", "star schema", "mark as date table", "add hierarchy", "calculation group", or any model-building task. Also invoke when creating multiple measures at once -- the skill contains critical gui
.claude/skills/minasaad1-power-bi-modeling/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-06 | ✗→✓ | ▲ Improved | -15% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 117% | 0% |
| case-01 | ✗→✓ | ▲ Improved | -11% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -43% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -20% | 0% |
Use pbi-cli to manage semantic model structure. Requires pipx install pbi-cli-tool, pbi-cli skills install, and pbi connect.
bashpipx install pbi-cli-tool pbi-cli skills install pbi connect
bashpbi table list # List all tables pbi table get Sales # Get table details pbi table create Sales --mode Import # Create table pbi table delete OldTable # Delete table pbi table rename OldName NewName # Rename table pbi table refresh Sales --type Full # Refresh table data pbi table schema Sales # Get table schema pbi table mark-date Calendar --date-column Date # Mark as date table
bashpbi column list --table Sales # List columns pbi column get Amount --table Sales # Get column details pbi column create Revenue --table Sales --data-type double --source-column Revenue # Data column pbi column create Profit --table Sales --expression "[Revenue]-[Cost]" # Calculated pbi column delete OldCol --table Sales # Delete column pbi column rename OldName NewName --table Sales # Rename column
bashpbi measure list # List all measures pbi measure list --table Sales # Filter by table pbi measure get "Total Revenue" --table Sales # Get details pbi measure create "Total Revenue" -e "SUM(Sales[Revenue])" -t Sales # Basic pbi measure create "Revenue $" -e "SUM(Sales[Revenue])" -t Sales --format-string "\$#,##0" # Formatted pbi measure create "KPI" -e "..." -t Sales --folder "Key Measures" --description "Main KPI" # With metadata pbi measure update "Total Revenue" -t Sales -e "SUMX(Sales, Sales[Qty]*Sales[Price])" # Update expression pbi measure delete "Old Measure" -t Sales # Delete pbi measure rename "Old" "New" -t Sales # Rename pbi measure move "Revenue" -t Sales --to-table Finance # Move to another table
Multi-line DAX in measure expressions: The -e flag passes DAX as a shell argument, which collapses newlines. For simple expressions like SUM(Sales[Amount]) or DIVIDE([A] - [B], [B]) this works fine. For complex expressions using VAR/RETURN, pipe from stdin instead:
bashecho 'VAR TotalSales = SUM(Sales[Amount]) VAR TotalCost = SUM(Sales[Cost]) RETURN TotalSales - TotalCost' | pbi measure create "Profit" -e - -t Sales
See the power-bi-dax skill for the full explanation and more workarounds.
bashpbi relationship list # List all relationships pbi relationship get RelName # Get details pbi relationship create \ --from-table Sales --from-column ProductKey \ --to-table Products --to-column ProductKey # Create relationship pbi relationship delete RelName # Delete pbi relationship find --table Sales # Find relationships for a table pbi relationship activate RelName # Activate pbi relationship deactivate RelName # Deactivate
bashpbi hierarchy list --table Date # List hierarchies pbi hierarchy get "Calendar" --table Date # Get details pbi hierarchy create "Calendar" --table Date # Create pbi hierarchy delete "Calendar" --table Date # Delete
bashpbi calc-group list # List calculation groups pbi calc-group create "Time Intelligence" --description "Time calcs" # Create group pbi calc-group items "Time Intelligence" # List items pbi calc-group create-item "YTD" \ --group "Time Intelligence" \ --expression "CALCULATE(SELECTEDMEASURE(), DATESYTD(Calendar[Date]))" # Add item pbi calc-group delete "Time Intelligence" # Delete group
Date tables are essential for time intelligence functions (TOTALYTD, SAMEPERIODLASTYEAR, DATEADD, etc.).
bash# Create a calculated date table with DAX (covers full calendar years) pbi table create Calendar \ --dax-expression "ADDCOLUMNS(CALENDAR(DATE(2023,1,1), DATE(2024,12,31)), \"Year\", YEAR([Date]), \"MonthNumber\", MONTH([Date]), \"MonthName\", FORMAT([Date], \"MMMM\"), \"Quarter\", \"Q\" & FORMAT([Date], \"Q\"))" # Mark it as a date table (required for time intelligence) pbi table mark-date Calendar --date-column Date # Verify it's recognized as a date table pbi calendar list
bash# 1. Create fact table pbi table create Sales --mode Import # 2. Create dimension tables pbi table create Products --mode Import pbi table create Calendar --mode Import # 3. Create relationships pbi relationship create --from-table Sales --from-column ProductKey --to-table Products --to-column ProductKey pbi relationship create --from-table Sales --from-column DateKey --to-table Calendar --to-column DateKey # 4. Mark date table pbi table mark-date Calendar --date-column Date # 5. Add measures pbi measure create "Total Revenue" -e "SUM(Sales[Revenue])" -t Sales --format-string "\$#,##0" pbi measure create "Total Qty" -e "SUM(Sales[Quantity])" -t Sales --format-string "#,##0" pbi measure create "Avg Price" -e "AVERAGE(Sales[UnitPrice])" -t Sales --format-string "\$#,##0.00" # 6. Verify pbi table list pbi measure list pbi relationship list
$#,##0), percentage (0.0%), and integer (#,##0) measuresmark-date for time intelligence--json flag when scripting: pbi --json measure listpbi database export-tmdl ./model/| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-06 | fail→pass | 12,241 | 2,105 | -83% | 1 | 1 | 0% | 2,087 | 1,773 | -15% | 0 | 0 | — |
case-17 | fail→pass | 5,099 | 2,355 | -54% | 1 | 1 | 0% | 845 | 1,835 | +117% | 0 | 0 | — |
case-01 | fail→pass | 13,828 | 4,012 | -71% | 1 | 1 | 0% | 2,546 | 2,263 | -11% | 0 | 0 | — |
case-02 | fail→pass | 24,524 | 5,367 | -78% | 1 | 1 | 0% | 4,597 | 2,633 | -43% | 0 | 0 | — |
case-03 | fail→pass | 14,297 | 3,468 | -76% | 1 | 1 | 0% | 2,661 | 2,124 | -20% | 0 | 0 | — |
case-04 | fail→pass | 15,343 | 3,030 | -80% | 1 | 1 | 0% | 2,660 | 2,063 | -22% | 0 | 0 | — |
case-05 | fail→pass | 15,721 | 1,621 | -90% | 1 | 1 | 0% | 1,220 | 1,740 | +43% | 0 | 0 | — |
case-07 | fail→pass | 5,291 | 2,101 | -60% | 1 | 1 | 0% | 827 | 1,813 | +119% | 0 | 0 | — |
case-08 | fail→pass | 9,287 | 2,330 | -75% | 1 | 1 | 0% | 1,535 | 1,901 | +24% | 0 | 0 | — |
case-09 | fail→pass | 7,081 | 3,251 | -54% | 1 | 1 | 0% | 1,154 | 2,087 | +81% | 0 | 0 | — |
case-10 | fail→pass | 12,399 | 2,684 | -78% | 1 | 1 | 0% | 2,060 | 1,976 | -4% | 0 | 0 | — |
case-11 | fail→pass | 9,714 | 2,172 | -78% | 1 | 1 | 0% | 1,741 | 1,842 | +6% | 0 | 0 | — |
case-12 | fail→pass | 7,198 | 2,357 | -67% | 1 | 1 | 0% | 1,246 | 1,900 | +52% | 0 | 0 | — |
case-13 | fail→pass | 14,523 | 2,517 | -83% | 1 | 1 | 0% | 2,498 | 1,905 | -24% | 0 | 0 | — |
case-14 | fail→pass | 11,706 | 1,964 | -83% | 1 | 1 | 0% | 1,785 | 1,788 | +0% | 0 | 0 | — |
case-15 | fail→pass | 12,289 | 2,543 | -79% | 1 | 1 | 0% | 2,136 | 1,876 | -12% | 0 | 0 | — |
case-16 | fail→pass | 12,900 | 2,013 | -84% | 1 | 1 | 0% | 2,102 | 1,845 | -12% | 0 | 0 | — |
case-18 | fail→pass | 15,166 | 2,195 | -86% | 1 | 1 | 0% | 2,481 | 1,858 | -25% | 0 | 0 | — |
case-19 | pass→pass | 15,942 | 16,683 | +5% | 1 | 1 | 0% | 2,652 | 4,235 | +60% | 0 | 0 | — |
case-20 | pass→pass | 8,555 | 6,217 | -27% | 1 | 1 | 0% | 1,398 | 2,499 | +79% | 0 | 0 | — |
case-21 | pass→pass | 12,699 | 9,765 | -23% | 1 | 1 | 0% | 2,162 | 3,033 | +40% | 0 | 0 | — |
case-22 | fail→pass | 11,730 | 1,363 | -88% | 1 | 1 | 0% | 1,862 | 1,667 | -10% | 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 +86 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.