skills/analytics/power-bi/SKILL.md
Microsoft Power BI expert. Deep expertise in semantic models, DAX, Power Query (M), storage modes, Fabric integration, report design, and governance. WHEN: "Power BI", "Power BI Desktop", "Power BI Service", "DAX", "DAX formula", "DAX measure", "CALCULATE", "filter context", "row context", "Power Query", "M language", "query folding", "VertiPaq", "DirectQuery", "Direct Lake", "semantic model", "Power BI dataset", "Power BI report", "Power BI dashboard", "Power BI Embedded", "Power BI gateway", "Power BI refresh", "paginated report", "RDL", "PBIX", "PBIR", "Power BI capacity", "PPU", "Power BI Premium", "Fabric Power BI", "Power BI Copilot", "Power BI RLS", "deployment pipeline Power BI".
npx skillsauth add chrishuffman5/domain-expert analytics-power-biInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a specialist in Microsoft Power BI, the business intelligence and analytics platform now deeply integrated with Microsoft Fabric. You have deep knowledge of:
Power BI is a managed service with monthly releases. There are no discrete version agents -- guidance applies to the current platform.
Classify the request:
references/architecture.md for VertiPaq internals, DAX evaluation contexts, storage mode mechanicsreferences/diagnostics.md for Performance Analyzer, DAX Studio, gateway issues, capacity management, refresh failuresreferences/best-practices.md for star schema, DAX optimization, Power Query, report design, security, ALMreferences/architecture.md for Service architecture, Fabric convergence, Direct LakeDetermine scope -- Identify whether the question is about Desktop authoring, Service administration, Embedded development, or Fabric integration. Behavior and licensing differ across these contexts.
Load context -- Read the relevant reference file for deep technical detail.
Analyze -- Apply Power BI-specific reasoning. Consider storage mode, filter context, relationship directions, and capacity licensing.
Recommend -- Provide actionable guidance with DAX examples, Power Query patterns, or configuration steps.
Verify -- Suggest validation steps (Performance Analyzer, DAX Studio Server Timings, "View as" role testing, VertiPaq Analyzer).
┌──────────────────────────────────────────────────────────┐
│ Microsoft Fabric │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌────────────┐ │
│ │ Data │ │ Synapse │ │ Real-Time│ │ Data │ │
│ │ Factory │ │ Eng/DS │ │ Intel │ │ Activator │ │
│ └─────┬────┘ └────┬─────┘ └────┬─────┘ └─────┬──────┘ │
│ │ │ │ │ │
│ └───────────┴─────┬──────┴──────────────┘ │
│ ┌─────▼─────┐ │
│ │ OneLake │ Delta / Parquet │
│ └─────┬─────┘ │
│ │ │
│ ┌───────────────┼──────────────┐ │
│ │ │ │ │
│ ┌──────▼──────┐ ┌──────▼─────┐ ┌─────▼──────┐ │
│ │ Direct Lake │ │ Import │ │DirectQuery │ │
│ │ (Fabric) │ │ (VertiPaq) │ │ (Source DB)│ │
│ └──────┬──────┘ └──────┬─────┘ └─────┬──────┘ │
│ └───────────────┼──────────────┘ │
│ ┌─────▼──────┐ │
│ │ Semantic │ │
│ │ Model │ │
│ └─────┬──────┘ │
│ ┌──────────────┼──────────────┐ │
│ ┌──────▼──────┐ ┌─────▼─────┐ ┌──────▼──────┐ │
│ │ Reports │ │Dashboards │ │ Paginated │ │
│ │ (.pbix/r) │ │ (tiles) │ │ (.rdl) │ │
│ └──────┬──────┘ └─────┬─────┘ └──────┬──────┘ │
└───────────┼──────────────┼──────────────┼────────────────┘
│ │ │
┌──────▼──────┐ ┌────▼─────┐ ┌──────▼──────┐
│ PBI Desktop │ │PBI Mobile│ │ PBI Embedded│
└─────────────┘ └──────────┘ └─────────────┘
| Component | Purpose | Platform | |---|---|---| | Power BI Desktop | Report authoring, data modeling, DAX/Power Query development | Windows desktop app | | Power BI Service | Cloud sharing, collaboration, scheduled refresh, apps, web authoring | Web (app.powerbi.com) | | Power BI Mobile | Dashboard consumption, offline caching, push notifications | iOS, Android | | Power BI Report Server | On-premises report hosting; updated 3x/year; feature lag vs cloud | Windows Server | | Power BI Embedded | Embed analytics in custom apps (app-owns-data / user-owns-data) | Azure / Fabric | | Microsoft Fabric | Unified analytics platform; OneLake, Direct Lake, lakehouses | Cloud SaaS |
Desktop remains the primary tool for production-quality reports with complex data models. Key Desktop-only features include Performance Analyzer, What-If Parameters, and the full relationship diagram view. The Service achieved core modeling parity in September 2025 (Power Query, DAX measures, RLS, calculation groups), enabling Mac users and browser-only workflows for lighter authoring scenarios.
The semantic model (formerly "dataset") is the analytical engine between raw data and report visuals.
Core elements:
Perspectives: Subsets of the model exposed to simplify the user experience for specific audiences. Do not provide security -- use RLS/OLS for access control.
Editing locations: Semantic models can be created and edited in both Desktop and Service (web authoring GA Sept 2025). Desktop remains recommended for complex production models. Web authoring supports: Power Query transformations, relationship management, DAX measures, RLS definition, DAX Query View, and calculation groups.
| Context | Description | Created By | |---|---|---| | Row context | Expression evaluated for each row individually | Calculated columns, iterators (SUMX, FILTER) | | Filter context | Set of active filters from slicers, visuals, DAX | Report interactions, CALCULATE, CALCULATETABLE |
CALCULATE modifies filter context before performing a calculation. It is the most important DAX function.
-- Override filter context: show total regardless of slicer selection
Total Sales All Regions =
CALCULATE([Total Sales], REMOVEFILTERS('Geography'))
-- Add filter: restrict to specific category
Electronics Sales =
CALCULATE([Total Sales], 'Product'[Category] = "Electronics")
Context transition: When CALCULATE is used inside a row context (e.g., inside SUMX), it converts the current row context into an equivalent filter context. This is powerful but can be a performance trap in iterators on large tables.
-- Year-over-year with safe division
YoY % Change =
VAR CurrentSales = [Total Sales]
VAR PriorYear = CALCULATE([Total Sales], SAMEPERIODLASTYEAR('Date'[Date]))
RETURN DIVIDE(CurrentSales - PriorYear, PriorYear)
-- Running total using visual calculations (preferred for visual-level running totals)
-- In visual calculation pane: Running Total = RUNNINGSUM([Total Sales])
-- Dynamic ranking
Product Rank =
VAR CurrentValue = [Total Sales]
RETURN
COUNTROWS(
FILTER(
ALLSELECTED('Product'[ProductName]),
[Total Sales] > CurrentValue
)
) + 1
Available in both Desktop and Service for ad-hoc DAX exploration. Write EVALUATE queries to test measures, inspect filter context, and validate calculation logic without building visuals. Export results to tables for quick data validation.
Power Query is the data transformation engine, using the M functional programming language.
Query folding is the most critical optimization -- it translates transformation steps into native source queries (SQL) for server-side processing:
Common folding breakers:
Staging query pattern: Create a staging query that folds completely to the source (filters, column selection), then build dependent queries that apply non-foldable transforms. Disable load on staging queries ("Enable load" unchecked) so they don't load into the model.
Dataflows:
| Mode | Engine | Data Location | Freshness | Best For | |---|---|---|---|---| | Import | VertiPaq (in-memory columnar) | Compressed in model | Scheduled refresh | Most scenarios; best query performance | | DirectQuery | Source database | Lives at source | Real-time | Large datasets, real-time requirements | | Direct Lake | VertiPaq from Delta | OneLake (Delta/Parquet) | Near real-time | Fabric; large data; no import needed | | Dual | Both Import + DirectQuery | Cached + source | Depends on query | Aggregation tables | | Composite | Mix of modes per table | Multiple locations | Varies | Flexibility across sources |
Import is the default and preferred for most scenarios. Data is compressed in VertiPaq columnar store with the fastest query performance. Limited by model size (1 GB shared, 10 GB+ Premium). Requires scheduled refresh to update data.
DirectQuery sends queries to the source database at runtime. No data is copied. Real-time freshness but higher latency (1-10 seconds per query). Source must be optimized with proper indexes. Each visual generates a separate source query.
Direct Lake (GA March 2026) reads Delta tables directly from OneLake without import. Combines Import-like performance with DirectQuery-like freshness. Available only in Microsoft Fabric. Uses "framing" to capture Delta table snapshots. Falls back to DirectQuery via SQL analytics endpoint when data exceeds memory. Supports composite models mixing Direct Lake + Import tables.
Composite models allow mixing storage modes per table within a single semantic model. Common pattern: Import for dimensions (fast filtering), DirectQuery for large fact tables (real-time). Aggregation tables in Dual mode serve 95%+ of queries from cache while detail queries hit the source on demand.
Power BI is the analytics/visualization layer within Fabric. Microsoft's strategy converges all data workloads under Fabric with Power BI as the primary consumption experience.
Key Fabric workloads integrated with Power BI:
Standalone Power BI vs Fabric: Standalone Pro/PPU licensing remains available, but OneLake, Direct Lake, Data Factory, Synapse, and Real-Time Intelligence are Fabric-only capabilities. Organizations with complex data engineering needs should evaluate Fabric; pure BI consumers can remain on standalone licensing.
Streaming data migration: Legacy push, streaming, and PubNub dataset types are deprecated (retiring October 2027). Migrate to Real-Time Intelligence in Fabric using Eventstreams for ingestion and KQL databases for real-time querying.
Pixel-perfect, print-optimized reports using RDL (Report Definition Language) format:
Two embedding scenarios with different authentication and licensing models:
| Scenario | Auth Model | Licensing | Best For | |---|---|---|---| | App-Owns-Data (Embed for Customers) | Service principal (certificate-based) | F-SKU capacity; users need no PBI license | ISVs, customer-facing apps | | User-Owns-Data (Embed for Your Org) | User's Entra ID token | Pro license per user (or F64+ for viewers) | Internal portals, intranets |
App-Owns-Data best practices:
powerbi-client) for iframe-based embeddingRLS implementation:
[Region] = "West" -- hardcoded filter[SalesRep_Email] = USERPRINCIPALNAME() -- filters by logged-in userAI governance: Admins can control which AI features Copilot leverages via tenant settings. Mark AI visuals as "Approved for Copilot" for compliance-aware adoption.
| Tier | Cost | Key Capabilities | |---|---|---| | Free | $0 | Personal analytics in My Workspace; no sharing | | Pro | $14/user/month | Share, collaborate, 8 refreshes/day, RLS, apps, Q&A | | PPU | $24/user/month | Pro + paginated reports, 48 refreshes/day, AI visuals, Copilot, XMLA, deployment pipelines, dataflows | | Fabric F64+ | ~$5,069+/month | All PPU features + unlimited viewers (no Pro needed), all Fabric workloads, Direct Lake, Azure metered billing, pause/resume |
Critical: F2-F32 SKUs include Fabric workloads but do NOT include Power BI Premium features (paginated reports, XMLA, deployment pipelines, unlimited viewers). F64 is the minimum for full Power BI Premium capability.
P-SKUs are fully retired (late 2025). All customers transitioned to Fabric F-SKUs.
| Tool | Purpose | Cost | |---|---|---| | Tabular Editor 2 | Model editing, Best Practice Analyzer | Free | | Tabular Editor 3 | Full IDE: IntelliSense, VertiPaq Analyzer, diagrams | Commercial | | DAX Studio | DAX queries, Server Timings, VertiPaq analysis | Free | | ALM Toolkit | Schema comparison and deployment | Free |
| Anti-Pattern | Problem | Correct Approach | |---|---|---| | Bidirectional relationships everywhere | Ambiguous results, slow queries, unpredictable DAX | Single-direction cross-filter; use DAX CROSSFILTER per-measure | | Calculated columns instead of measures | Consumes storage, evaluated at refresh not query time | Use measures; they evaluate at query time and don't store data | | Iterator on multi-million-row fact table | Single-threaded Formula Engine bottleneck | Pre-compute column in Power Query or use native aggregations | | No date table (relying on auto date/time) | Bloated model, limited time intelligence | Create dedicated date table; mark as date table; disable auto date/time | | 20+ visuals per report page | Slow load, excessive parallel queries | Limit to 8 visuals per page; use drillthrough for detail | | FILTER on large table in CALCULATE | Materializes entire table in Formula Engine | Use column filter predicates directly in CALCULATE arguments | | Nested CALCULATE calls | Hard to reason about filter context, performance cost | Restructure with VAR/RETURN to separate computation from context modification | | No query folding awareness | Full data pulled into Power Query engine | Structure steps to maintain folding; check with "View Native Query" | | Skipping RLS testing | Data leaks in production | Always test with "View as" role and DAX Studio before deployment | | Manual ALM (copy/paste between environments) | Error-prone, no audit trail | Use deployment pipelines + PBIR format + git integration | | SELECT * in Power Query | Loads all columns including unused ones | Select only needed columns; remove others early | | Ignoring referential integrity | Orphan keys bloat model, cause blank rows in visuals | Clean orphan keys in Power Query; validate key relationships | | Using Report Server for new deployments | Feature lag, no AI, no Direct Lake, no monthly updates | Use Power BI Service unless regulatory/compliance mandates on-premises | | All refreshes at midnight | Capacity contention, throttling | Stagger refresh schedules across 2-hour windows |
skills/analytics/ssas/SKILL.md -- SSAS/Tabular model overlap (shared VertiPaq engine, DAX, XMLA protocol)skills/database/sql-server/SKILL.md -- SQL Server as common data source; query folding targets SQLskills/analytics/SKILL.md -- Parent analytics domain agentreferences/architecture.md -- VertiPaq engine internals, DirectQuery mechanics, Direct Lake architecture, Service architecture, Fabric convergence, DAX evaluation engine detailsreferences/best-practices.md -- Star schema modeling, DAX performance, Power Query optimization, report design, deployment/ALM, security/governance, large dataset strategiesreferences/diagnostics.md -- Performance Analyzer workflow, DAX Studio analysis, VertiPaq Analyzer, gateway troubleshooting, capacity management, refresh failure diagnosisdevelopment
Top-level routing agent for ALL backend web framework and REST API technologies. Provides cross-framework expertise in API design, HTTP semantics, authentication, framework selection, and performance patterns. WHEN: "backend framework", "REST API", "web API", "which framework", "Express vs FastAPI", "Django vs Rails", "Spring Boot vs", "API design", "backend architecture", "framework comparison", "API authentication", "API versioning", "middleware", "API performance".
tools
WebSocket protocol specialist covering RFC 6455, opening handshake, frame format, close codes, extensions (permessage-deflate), subprotocols, browser API, server implementations, authentication patterns, and reconnection strategies. WHEN: "WebSocket", "ws", "wss", "RFC 6455", "WebSocket handshake", "WebSocket close code", "WebSocket frame", "ping pong", "permessage-deflate", "WebSocket subprotocol", "WebSocket authentication", "WebSocket reconnect", "bufferedAmount", "WebSocket binary", "WebSocket proxy", "1006", "1000", "1001".
tools
Server-Sent Events specialist covering the EventSource API, text/event-stream format, auto-reconnection, Last-Event-ID resumption, named events, server implementations across Node.js/Python/Go/.NET/Rust, LLM streaming patterns, and infrastructure configuration. WHEN: "SSE", "Server-Sent Events", "EventSource", "text/event-stream", "Last-Event-ID", "event stream", "LLM streaming", "AI streaming", "token streaming", "server push", "live feed", "log streaming", "progress events", "retry field", "keepalive", "MCP transport".
development
Socket.IO 4.x specialist covering namespaces, rooms, acknowledgements, adapters, scaling, connection state recovery, middleware, TypeScript types, and multi-server deployment. WHEN: "Socket.IO", "socket.io", "rooms", "namespaces", "Socket.IO adapter", "Redis adapter", "Socket.IO scaling", "Socket.IO middleware", "Socket.IO authentication", "Engine.IO", "Socket.IO reconnect", "emitWithAck", "Socket.IO admin", "connection state recovery", "volatile emit", "Socket.IO TypeScript".