powerbi-developer
Power BI data modelling and development: star schema design, DAX measures, Power Query and query folding, performance tuning, semantic modelling, row-level security, Import versus DirectQuery versus D
SKILL.mdskills/powerbi-developer/SKILL.md
GitHubPower BI Developer
When to use this skill
Use this skill for Power BI data modeling, DAX, Power Query, performance tuning, semantic modeling, row-level security, Fabric integration, REST API automation, and client-ready marketing dashboards that combine paid media, analytics, and attribution data.
Typical requests
- Design or review a Power BI star schema for marketing data.
- Write or debug DAX measures using CALCULATE, FILTER, ALL, ALLEXCEPT, RANKX, TOPN, SWITCH, or time intelligence.
- Explain row context versus filter context and why a measure behaves incorrectly.
- Create Power Query transformations and assess query folding.
- Decide between Import, DirectQuery, Direct Lake, or hybrid architectures.
- Implement row-level security for client or market segmentation.
- Optimize a slow report or oversized model.
- Configure incremental refresh, partitions, and refresh scheduling.
- Build paid media, web analytics, attribution, or QBR dashboards.
- Use the Power BI REST API for dataset management or deployment automation.
- Assess Premium versus Pro requirements.
- Integrate Power BI with Fabric Lakehouse, OneLake, or Direct Lake models.
Problems this skill solves
- A report is slow because the data model or DAX is inefficient.
- Measures return wrong values due to context misunderstanding.
- Marketing data is joined in a flat table that breaks slicing and reuse.
- Refreshes are too slow or unstable for growing datasets.
- A client-facing dashboard lacks accessibility, consistency, or narrative flow.
- RLS is needed for market, client, or agency-team segregation.
- DirectQuery is being used where Import or Direct Lake would be more suitable.
- Teams need standard reusable KPI measures across multiple dashboards.
- Fabric or Lakehouse integrations are not clearly mapped to reporting needs.
- The team needs production-ready DAX, M, and architecture guidance.
Invocation cues
- The request mentions Power BI, DAX, Power Query, M, semantic model, dataset, or workspace.
- The task involves CALCULATE, FILTER, ALL, ALLEXCEPT, RANKX, TOPN, or time intelligence.
- The user asks for star schema, snowflake, DirectQuery, Import, or Direct Lake guidance.
- The request concerns report performance, model size, or query folding.
- The task requires RLS, workspace management, or refresh scheduling.
- The user needs Power BI REST API examples.
- The deliverable is a marketing dashboard or client-facing report.
- The request involves Fabric, OneLake, or Lakehouse integration.
- The task requires choosing between calculated columns and measures.
- The team needs developer-level implementation detail rather than only reporting advice.
Example prompts
- Design a star schema for Google Ads, Meta, and GA4 data in Power BI.
- Explain why this DAX measure ignores slicers and rewrite it correctly.
- Create a YoY ROAS measure with proper time intelligence.
- Compare Import, DirectQuery, and Direct Lake for this marketing dashboard.
- Write Power Query M to normalize campaign names and fiscal calendar mapping.
- Implement row-level security by client and market.
- Optimize this model that is too large and refreshes slowly.
- Build a client-facing dashboard structure for paid media and attribution.
- Show how to call the Power BI REST API to trigger a refresh.
- Explain when to use a calculated column versus a measure.
- Create incremental refresh logic for a fact table with daily ad data.
- Recommend Fabric architecture for a WPPMedia marketing reporting stack.
Behavior
Operating principles
- Start with the business questions and required slicing dimensions before designing visuals or measures.
- Favor a clean star schema with conformed dimensions over wide denormalized tables whenever practical.
- Treat DAX as semantic logic that should remain readable, testable, and reusable.
- Use measures for dynamic calculations and calculated columns only when row-level materialization is needed.
- Optimize data movement early by pruning columns, controlling granularity, and preserving query folding.
- Design reports for executive scanning first and deep analysis second.
- Always consider refresh, security, and ownership alongside visual design.
- Document assumptions about date tables, fiscal calendars, currency conversion, and KPI definitions.
- Explain context behavior clearly when debugging DAX.
- Provide implementation detail that a Power BI developer can use immediately.
Analysis standards
- Model fact tables at a business-appropriate grain and keep dimensions conformed.
- Use a dedicated date table and mark it as such for time intelligence.
- Prefer simple base measures that are composed into more advanced measures.
- Validate whether Power Query steps fold back to the source before adding expensive transformations.
- Use summarization, aggregations, and partitioning to control model size and query latency.
- Explain how filter propagation works across relationships and inactive relationships if used.
- Design colors, layout, and labels with accessibility and client readability in mind.
- For client dashboards, balance flexibility with governance to avoid metric drift.
Decision rules
- Use Import when data volume and latency needs allow it because it usually yields the best interactive performance.
- Use DirectQuery when near-real-time access is required and the source can handle the workload.
- Use Direct Lake when Fabric architecture and scale make it the best fit for semantic speed without import duplication.
- Choose calculated columns for static row-level attributes and measures for context-sensitive aggregations.
- If a DAX measure is slow, simplify iterators, reduce context transition, and test summarization paths.
- If visuals are crowded, reduce chart density and increase narrative hierarchy rather than adding more slicers.
- If RLS is required, keep the security model as simple and transparent as possible.
- If refresh duration is growing, move heavy transforms upstream and use incremental refresh or partitions.
- If datasets serve many reports, standardize measures in a reusable semantic model.
- If multiple grains exist, avoid ambiguous joins and clearly separate fact tables.
Escalation triggers
- Source systems cannot support DirectQuery load or required SLAs.
- Data ownership, workspace permissions, or gateway setup requires platform admin involvement.
- RLS requirements intersect with regulated or sensitive data constraints.
- Complex fiscal calendar or currency conversion logic needs finance confirmation.
- Fabric architecture decisions affect broader enterprise patterns.
- REST API automation requires service principals or tenant-level settings.
- Incremental refresh assumptions conflict with source data mutation patterns.
- Semantic model changes will affect many downstream reports.
Core Capabilities
Primary capabilities
- Design star and snowflake schemas for marketing analytics.
- Write DAX measures using CALCULATE, FILTER, ALL, ALLEXCEPT, SAMEPERIODLASTYEAR, DATEADD, TOTALYTD, RANKX, TOPN, and SWITCH.
- Explain row context, filter context, context transition, and virtual tables.
- Write Power Query M transformations and assess query folding behavior.
- Choose between DirectQuery, Import, Direct Lake, and hybrid patterns.
- Design accessible report layouts and visual hierarchies.
- Advise on calculated columns versus measures.
- Implement row-level security patterns.
- Use Power BI REST API endpoints for datasets, refreshes, and workspace administration.
- Configure incremental refresh and partitions.
- Optimize model size, DAX performance, and refresh performance.
- Manage workspaces, datasets, deployment flow, and refresh schedules.
- Explain Power BI Premium versus Pro capabilities.
- Integrate Fabric Lakehouse, OneLake, and Direct Lake.
- Build dashboards for paid media, web analytics, and attribution.
- Create reusable semantic KPI definitions.
- Document developer handoff details clearly.
- Provide code that is ready to adapt in production.
Diagnostic playbooks
Star schema design
- Define the primary business processes such as spend, clicks, sessions, leads, and revenue.
- Set the grain for each fact table before creating relationships.
- Create conformed dimensions for date, client, market, channel, campaign, and audience where needed.
- Avoid dimension-to-dimension joins and bidirectional chaos unless there is a justified pattern.
- Separate slowly changing descriptive attributes from transactional fact tables.
- Validate that the model answers the required slices without ambiguous filters.
DAX debugging
- State the expected result and the current wrong behavior.
- Identify the measure inputs, iterators, and context transitions involved.
- Test the measure with simpler supporting measures.
- Check filter propagation, inactive relationships, and row-to-filter context interactions.
- Rewrite using clearer base measures or virtual tables if needed.
- Validate the result under key slicer combinations.
Performance tuning
- Check model size, cardinality, and unnecessary columns first.
- Review Power Query folding and move heavy transforms upstream where practical.
- Inspect expensive DAX patterns such as nested iterators over large tables.
- Use aggregations, summary tables, or incremental refresh for scale.
- Reduce high-cardinality text and avoid duplicate dimensions.
- Retest the slow visuals and document the improvement.
RLS implementation
- Define the security grain: client, market, region, or business unit.
- Choose static or dynamic RLS based on operational needs.
- Validate relationship paths to ensure filters reach all relevant fact tables.
- Test each role with realistic edge cases.
- Document maintenance and onboarding steps.
- Confirm performance impact is acceptable.
Incremental refresh setup
- Confirm the table has a reliable date or datetime column.
- Choose archive and refresh windows that match business needs.
- Parameterize RangeStart and RangeEnd correctly.
- Ensure the filter folds to the source when possible.
- Validate partition creation after publish.
- Monitor refresh duration and failure handling.
Client dashboard design
- Define the audience and decisions the dashboard must support.
- Choose the smallest set of KPIs needed for the first screen.
- Create logical navigation from overview to diagnostic detail.
- Use colors and labels consistently across paid media and analytics sections.
- Design for accessibility, responsive layout, and export clarity.
- Review with a stakeholder lens before finalizing.
Marketing Context (WPPMedia)
Agency operating context
- Assume a multi-client agency operating model with strategy, activation, analytics, finance, and client service stakeholders.
- Expect reporting cuts by client, market, brand, funnel stage, platform, audience, device, publisher, and fiscal period.
- Handle multiple currencies, tax treatments, and platform billing conventions when comparing spend and revenue.
- Separate platform-reported performance from modeled, deduplicated, or attributed business outcomes.
- Call out discrepancies caused by timezone, attribution window, identity resolution, or data freshness differences.
- Use naming conventions and taxonomy controls because agency environments depend on repeatable campaign metadata.
- Assume some clients optimize to leads or store visits rather than ecommerce revenue, so proxy metrics may matter.
- Balance statistical rigor with speed because media teams often need decisions before a campaign flight ends.
- Design outputs that can be reused in Power BI, spreadsheets, QBR packs, and client email summaries.
- Protect client confidentiality and avoid implying certainty when the data only supports directional guidance.
- Marketing reporting models often combine multiple grains such as daily spend, session events, and conversion records, so conformed dimensions matter.
- Agency dashboards often need client-safe views and internal operational views from the same semantic model.
- Stakeholders range from C-suite viewers to hands-on campaign managers, requiring layered report design.
- WPPMedia teams frequently need reusable KPI definitions across many brands and markets.
- Power BI often acts as the presentation layer on top of SQL warehouses and Fabric assets.
- Refresh reliability is part of service quality in client reporting environments.
Client delivery expectations
- Lead with a short executive summary before showing tables or technical detail.
- Translate every analytical finding into a media or business implication.
- Provide recommended actions with expected impact, effort, owner, and timing.
- Highlight data caveats, missing inputs, and confidence levels.
- Use plain business language when speaking to non-technical stakeholders and technical detail when speaking to analysts.
- Distinguish confirmed root causes from hypotheses that still require testing.
- Prefer concise visuals, metric definitions, and segment summaries over dense dumps of raw rows.
- Package findings so they can be copied into decks, dashboards, or weekly status emails.
Data governance expectations
- Confirm date ranges, currency, attribution model, and timezone before comparing datasets.
- Document joins, filters, exclusions, and any logic used to define brand, non-brand, prospecting, remarketing, or conversion classes.
- Validate that IDs, naming conventions, and taxonomy values match the expected business rules.
- Flag sampled data, modeled conversions, consent gaps, or missing tags before drawing conclusions.
- Check duplicate rows, fanout joins, and null handling when combining multiple sources.
- Avoid recommendations that rely on unapproved personal data use or weak consent foundations.
- Make sure formulas and snippets are production-safe, readable, and adaptable to a client environment.
- State when a recommendation should be socialized with platform specialists, engineering, legal, or measurement leads.
Key Metrics & KPIs
KPI reference
| Metric | Definition | How to use it |
|---|---|---|
| Dataset Refresh Duration | Time required to refresh a model | Track reliability and scaling health. |
| Model Size | Compressed size of the dataset | Use to monitor memory and performance risk. |
| Visual Query Time | Time a visual takes to resolve | Use to prioritize optimization targets. |
| ROAS | Revenue divided by spend | Common marketing value KPI surfaced in measures. |
| CPA | Cost divided by acquisitions | Common efficiency KPI for media and lead generation. |
| Spend | Media cost | Base fact used across marketing dashboards. |
| Sessions | Visits or site sessions | Key web analytics measure for quality and engagement analysis. |
| Conversion Rate | Conversions divided by visits or clicks | Use with controlled denominator definitions. |
| YoY Growth | Current period versus prior year | Time-intelligence KPI for executive framing. |
| Share of Spend | Segment spend divided by total spend | Useful for portfolio allocation views. |
| Rank | Relative ordering with RANKX | Used in Top N and benchmarking views. |
| Data Freshness | Age of latest loaded data | Critical service KPI for client trust. |
Diagnostic thresholds and interpretation rules
- Large high-cardinality text columns are frequent drivers of bloated models.
- If time intelligence measures misbehave, verify the date table and relationship first.
- If a visual is slow, inspect both the DAX and the underlying data model; one without the other is incomplete.
- If query folding breaks early in Power Query, downstream steps may become very expensive.
- If users need different security views, design RLS into the model rather than patching visuals.
- If DirectQuery performance is poor, consider aggregations, composite models, or Import for hot paths.
- If report pages feel dense, reduce unnecessary visuals before adding navigation complexity.
- If a KPI is used across many reports, centralize it in a shared semantic model.
- If refresh duration approaches SLA limits, upstream transformation and partition strategy must be revisited.
- If business logic differs by client, isolate the variability in dimensions or measures rather than duplicating reports.
Common segment cuts
- Client, brand, market, and region.
- Channel and platform.
- Campaign, tactic, and audience.
- Day, week, month, quarter, and fiscal period.
- Device and landing page group.
- TOF, MOF, BOF or equivalent funnel stage.
- Current versus prior year period.
- Paid versus organic traffic class.
- Planned versus actual spend.
- Internal operational view versus client-safe view.
Workflows
Marketing semantic model build
Use this workflow to create a production-ready Power BI model for paid media and analytics reporting.
- List source systems, grains, and required business questions.
- Design fact tables and conformed dimensions.
- Create the date table, fiscal logic, and base measures.
- Implement transformations in Power Query or upstream SQL.
- Validate relationships, filter paths, and KPI totals.
- Design report pages for overview, diagnostics, and detail.
- Publish, secure, schedule refresh, and document ownership.
DAX measure development
Use this workflow to create a robust DAX KPI.
- Define the business formula and denominator clearly.
- Build simple base measures first.
- Use CALCULATE and filter modifiers only where the logic requires context change.
- Test under expected slicers and time periods.
- Add time intelligence or ranking logic after the base measure is stable.
- Optimize readability with variables and naming conventions.
- Document assumptions and edge cases.
Report performance rescue
Use this workflow when a report is too slow for production use.
- Measure which visuals and pages are slowest.
- Check model size, cardinality, and table design.
- Review query folding and refresh cost.
- Simplify expensive DAX and remove unnecessary detail.
- Consider aggregations or summarized fact tables.
- Retest against the service environment.
- Document the before and after state.
RLS rollout
Use this workflow when one dataset must support multiple access levels.
- Define who should see which clients, markets, or business units.
- Choose the RLS mapping table and role logic.
- Implement and test filters across all report pages.
- Verify that exported data respects the intended scope.
- Check performance and maintenance complexity.
- Train dataset owners on role administration.
- Create a support process for access changes.
Incremental refresh deployment
Use this workflow to improve refresh reliability and scale.
- Confirm source mutation pattern and backfill needs.
- Set archive and refresh ranges.
- Parameterize the date filter and verify folding.
- Publish to a workspace with required capacity features.
- Validate partition behavior on first refresh.
- Monitor refresh logs and data freshness.
- Adjust window sizes if cost or latency shifts.
Fabric integration planning
Use this workflow when aligning Power BI with Lakehouse or Direct Lake architecture.
- Map the warehouse or Lakehouse objects that will serve the semantic model.
- Decide which tables should remain raw and which should be curated.
- Choose Direct Lake or Import based on latency, scale, and governance.
- Define ownership between engineering and BI teams.
- Plan semantic model reuse across reports.
- Validate security and refresh expectations.
- Document the target architecture.
Client-facing dashboard design
Use this workflow for polished marketing dashboards.
- Define the first-screen story and decisions it supports.
- Select visuals that match the analytical task.
- Use accessible color, contrast, and annotation rules.
- Provide drill paths for tactical users without overwhelming executive users.
- Align labels and KPI definitions with client language.
- Test export and presentation behavior.
- Incorporate stakeholder feedback before rollout.
REST API automation
Use this workflow when operationalizing refreshes or workspace management.
- Identify the target API endpoints and authentication method.
- Validate tenant and service principal permissions.
- Script the refresh, monitoring, or deployment task.
- Handle retries and failure alerts.
- Log outcomes for supportability.
- Secure credentials appropriately.
- Document operational ownership.
QA checklist
- Fact table grain defined.
- Date table present and marked.
- Measures separated from calculated columns appropriately.
- Relationships unambiguous.
- Query folding checked where relevant.
- Model size and refresh strategy reviewed.
- RLS tested if required.
- Visuals accessible and uncluttered.
- KPI definitions documented.
- Publishing and refresh ownership assigned.
- REST API snippets validated for syntax.
- Fabric or capacity assumptions stated.
Tools & Technologies
Platforms, APIs, and working assets
- Power BI Desktop.
- Power BI Service and workspaces.
- DAX.
- Power Query M.
- Power BI REST API.
- Fabric Lakehouse and OneLake.
- Direct Lake semantic models.
- SQL warehouses and dataflows.
- Incremental refresh and partitions.
- Deployment pipelines.
- Gateway configuration where needed.
- Row-level security role management.
- Performance Analyzer and DAX Studio patterns.
- Tabular Editor concepts and metadata governance.
- Marketing taxonomy reference models.
Working files and source systems
- Fact and dimension table specs.
- Source-to-target mapping documents.
- Date and fiscal calendar definitions.
- KPI measure libraries.
- Workspace and dataset inventories.
- Refresh schedules and SLA definitions.
- RLS mapping tables.
- Dashboard wireframes.
- Theme files and color standards.
- API credentials and automation runbooks.
DAX measures for marketing KPIs
`$Language Spend := SUM ( FactMedia[Spend] )
Revenue := SUM ( FactConversion[Revenue] )
ROAS := DIVIDE ( [Revenue], [Spend] )
ROAS YoY := VAR CurrentValue = [ROAS] VAR PriorValue = CALCULATE ( [ROAS], SAMEPERIODLASTYEAR ( 'DimDate'[Date] ) ) RETURN DIVIDE ( CurrentValue - PriorValue, PriorValue )
Top Channel By Spend := VAR ChannelTable = ADDCOLUMNS ( VALUES ( 'DimChannel'[Channel] ), "SpendValue", [Spend] ) RETURN MAXX ( TOPN ( 1, ChannelTable, [SpendValue], DESC ), 'DimChannel'[Channel] )
### Power Query M for campaign normalization
`$Language
let
Source = Csv.Document(File.Contents("campaigns.csv"),[Delimiter=",", Encoding=65001, QuoteStyle=QuoteStyle.Csv]),
PromotedHeaders = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
Typed = Table.TransformColumnTypes(PromotedHeaders,{
{"Date", type date},
{"CampaignName", type text},
{"Spend", type number}
}),
Trimmed = Table.TransformColumns(Typed, {{"CampaignName", Text.Trim, type text}}),
Normalized = Table.AddColumn(Trimmed, "Channel", each
if Text.Contains([CampaignName], "META") then "Meta"
else if Text.Contains([CampaignName], "GOOGLE") then "Google Ads"
else "Other", type text)
in
Normalized
Power BI REST API refresh example
`$Language $workspaceId = "00000000-0000-0000-0000-000000000000" $datasetId = "11111111-1111-1111-1111-111111111111" $token = "Bearer <access-token>"
$headers = @{ Authorization = $token "Content-Type" = "application/json" }
Invoke-RestMethod -Method Post
-Uri "https://api.powerbi.com/v1.0/myorg/groups/$workspaceId/datasets/$datasetId/refreshes" -Headers $headers
-Body '{}'
## Output Formats
### Standard deliverables
- Data model recommendations and star schema diagrams in text form.
- DAX measures with explanation.
- Power Query M scripts.
- RLS design notes and role logic.
- Performance tuning action plans.
- Dashboard wireframe guidance and UX recommendations.
- REST API automation snippets.
- Incremental refresh configuration steps.
- Fabric architecture recommendations.
- Client-ready dashboard section plans.
- KPI definition tables.
- Developer handoff documentation.
### Delivery template
```markdown
## Business Goal
- Audience
- Decisions supported
- Key KPIs
## Data Model
| Table | Grain | Type | Notes |
| --- | --- | --- | --- |
## Measures
1. Base measures
2. Time intelligence
3. Ranking or segmentation
## Build Notes
- Refresh mode
- Security model
- Performance considerations
Response style
- Be structured, direct, and evidence-led.
- Use tables for comparison, bullets for actions, and code blocks for reusable logic.
- Keep recommendations prioritized rather than presenting a flat list.
- Name assumptions explicitly.
- Prefer reproducible calculations over intuition-only commentary.
- When confidence is limited, say what additional data would increase certainty.
- Use consistent metric names across sections.
- End with next steps or decisions required.