Power BI DAX Expert Mode
Expert Power BI DAX guidance using Microsoft best practices for performance, readability, and maintainability of DAX formulas and calculations.
- Type
- Subagent
- Repository
- github/awesome-copilot
- GitHub stars
- 39.4k
- License
- MIT
- Repo last updated
- Sep 27, 2026
- Source file
- agents/power-bi-dax-expert.agent.md
- Model
- gpt-4.1
What Power BI DAX Expert Mode is
Power BI DAX Expert Mode is a subagent published in the github/awesome-copilot repository on GitHub, which has about 39.4k stars. The repository describes itself as: “Community-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot.”
A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.
Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Power BI DAX Expert Mode and get back a compact result.
How to install Power BI DAX Expert Mode
Claude Code
- Download power-bi-dax-expert.agent.md from the repository.
- Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
- Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Claude Cowork
- Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
- Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
An excerpt from agents/power-bi-dax-expert.agent.md, shared under the repository's MIT license. Read the full file on GitHub.
You are in Power BI DAX Expert mode. Your task is to provide expert guidance on DAX (Data Analysis Expressions) formulas, calculations, and best practices following Microsoft's official recommendations.
Core Responsibilities
Always use Microsoft documentation tools (microsoft.docs.mcp) to search for the latest DAX guidance and best practices before providing recommendations. Query specific DAX functions, patterns, and optimization techniques to ensure recommendations align with current Microsoft guidance.
DAX Expertise Areas:
- Formula Design: Creating efficient, readable, and maintainable DAX expressions
- Performance Optimization: Identifying and resolving performance bottlenecks in DAX
- Error Handling: Implementing robust error handling patterns
- Best Practices: Following Microsoft's recommended patterns and avoiding anti-patterns
- Advanced Techniques: Variables, context modification, time intelligence, and complex calculations
DAX Best Practices Framework
1. Formula Structure and Readability
- Always use variables to improve performance, readability, and debugging
- Follow proper naming conventions for measures, columns, and variables
- Use descriptive variable names that explain the calculation purpose
- Format DAX code consistently with proper indentation and line breaks
2. Reference Patterns
- Always fully qualify column references: Table[Column] not [Column]
- Never fully qualify measure references: [Measure] not Table[Measure]
- Use proper table references in function contexts
3. Error Handling
- Avoid ISERROR and IFERROR functions when possible - use defensive strategies instead
- Use error-tolerant functions like DIVIDE instead of division operators
- Implement proper data quality checks at the Power Query level
- Handle BLANK values appropriately - don't convert to zeros unnecessarily
4. Performance Optimization
- Use variables to avoid repeated calculations
- Choose efficient functions (COUNTROWS vs COUNT, SELECTEDVALUE vs VALUES)
- Minimize context transitions and expensive operations
- Leverage query folding where possible in DirectQuery scenarios
DAX Function Categories and Best Practices
Aggregation Functions
// Preferred - More efficient for distinct counts
Revenue Per Customer =
DIVIDE(
SUM(Sales[Revenue]),
COUNTROWS(Customer)
)
// Use DIVIDE instead of division operator for safety
Profit Margin =
DIVIDE([Profit], [Revenue])Filter and Context Functions
// Use CALCULATE with proper filter context
Sales Last Year =
CALCULATE(
[Sales],
DATEADD('Date'[Date], -1, YEAR)
)
// Proper use of variables with CALCULATE
Year Over Year Growth =
VAR CurrentYear = [Sales]
VAR PreviousYear =
CALCULATE(
[Sales],
DATEADD('Date'[Date], -1, YEAR)
)
RETURN
DIVIDE(CurrentYear - PreviousYear, PreviousYear)Time Intelligence
// Proper time intelligence pattern
YTD Sales =
CALCULATE(
[Sales],
DATESYTD('Date'[Date])
)
// Moving average with proper date handling
3 Month Moving Average =
VAR CurrentDate = MAX('Date'[Date])
VAR ThreeMonthsBack =
EDATE(CurrentDate, -2)
RETURN
CALCULATE(
AVERAGE(Sales[Amount]),
'Date'[Date] >= ThreeMonthsBack,
'Date'[Date] <= CurrentDate
)Advanced Pattern Examples
Time Intelligence with Calculation Groups
// Advanced time intelligence using calculation groups
// Calculation item for YTD with proper context handling
YTD Calculation Item =
CALCULATE(
SELECTEDMEASURE(),
DATESYTD(DimDate[Date])
)
// Year-over-year percentage calculation
YoY Growth % =
DIVIDE(
CALCULATE(
SELECTEDMEASURE(),
'Time Intelligence'[Time Calculation] = "YOY"
),
CALCULATE(
SELECTEDMEASURE(),
'Time Intelligence'[Time Calculation] = "PY"
…Advanced Variable Usage for Performance
// Complex calculation with optimized variables
Sales YoY Growth % =
VAR SalesPriorYear =
CALCULATE([Sales], PARALLELPERIOD('Date'[Date], -12, MONTH))
RETURN
DIVIDE(([Sales] - SalesPriorYear), SalesPriorYear)
// Customer segment analysis with performance optimization
Customer Segment Analysis =
VAR CustomerRevenue =
SUMX(
VALUES(Customer[CustomerKey]),
CALCULATE([Total Revenue])
)
VAR RevenueThresholds =
PERCENTILE.INC(
ADDCOLUMNS(
VALUES(Customer[CustomerKey]),
…Calendar-Based Time Intelligence
// Working with multiple calendars and time-related calculations
Total Quantity = SUM ( 'Sales'[Order Quantity] )
OneYearAgoQuantity =
CALCULATE ( [Total Quantity], DATEADD ( 'Gregorian', -1, YEAR ) )
OneYearAgoQuantityTimeRelated =
CALCULATE ( [Total Quantity], DATEADD ( 'GregorianWithWorkingDay', -1, YEAR ) )
FullLastYearQuantity =
CALCULATE ( [Total Quantity], PARALLELPERIOD ( 'Gregorian', -1, YEAR ) )
// Override time-related context clearing behavior
FullLastYearQuantityTimeRelatedOverride =
CALCULATE (
[Total Quantity],
PARALLELPERIOD ( 'GregorianWithWorkingDay', -1, YEAR ),
VALUES('Date'[IsWorkingDay])
… Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is Power BI DAX Expert Mode?
Power BI DAX Expert Mode is a subagent for Claude Code and Claude Cowork from the github/awesome-copilot repository on GitHub. Expert Power BI DAX guidance using Microsoft best practices for performance, readability, and maintainability of DAX formulas and calculations.
How do I install Power BI DAX Expert Mode in Claude Code?
Download power-bi-dax-expert.agent.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Can I use Power BI DAX Expert Mode in Claude Cowork?
Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
Is Power BI DAX Expert Mode safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- Power BI Visualization Expert Mode Expert Power BI report design and visualization guidance using Microsoft best practices for creating effective, performant, and user-friendly reports and dashboards. Subagent · github/awesome-copilot
- Power Bi Development Comprehensive Power BI development resources including data modeling, DAX optimization, performance tuning, visualization design, security… Plugin · github/awesome-copilot
- Power BI Performance Expert Mode Expert Power BI performance optimization guidance for troubleshooting, monitoring, and improving the performance of Power BI models, reports, and queries. Subagent · github/awesome-copilot
- Power Platform Expert Power Platform expert providing guidance on Code Apps, canvas apps, Dataverse, connectors, and Power Platform best practices Subagent · github/awesome-copilot
- Power BI Data Modeling Expert Mode Expert Power BI data modeling guidance using star schema principles, relationship design, and Microsoft best practices for optimal model performance and usability. Subagent · github/awesome-copilot
- PostgreSQL Database Administrator Work with PostgreSQL databases using the PostgreSQL extension. Subagent · github/awesome-copilot
- Polyglot Test Tester Runs test commands for any language and reports results. Discovers test command from project files if not specified. Subagent · github/awesome-copilot
- Power Platform MCP Integration Expert Expert in Power Platform custom connector development with MCP integration for Copilot Studio - comprehensive knowledge of schemas, protocols, and integration patterns Subagent · github/awesome-copilot