AI-assisted DAX: writing measures with Copilot, ChatGPT and Claude

AI tools can write, explain and debug DAX measures well when you give them the model structure: table names, columns, relationships and what the measure should mean. Copilot in Power BI sees your model directly; ChatGPT and Claude need you to paste the relevant parts. AI is good at time intelligence, ranking and explaining existing formulas. It still makes mistakes with filter context, blank handling and business rules, so test every measure against known numbers before publishing.

Can AI really write DAX?

Yes, for a large share of everyday measures. DAX has a well-documented function library and many public examples, so language models have seen a lot of it. The hard part of DAX is not syntax but context: which filters apply, how tables relate and what the business means by “active customer” or “resolved on time”. AI only gets that right when you tell it.

Which tool should you use?

ToolSees your model?Best for
Copilot in Power BIYes, directlyMeasures inside Desktop or the service, explaining existing DAX
ChatGPTNo, paste contextDrafting, explaining and refactoring long formulas
ClaudeNo, paste contextReviewing complex measures and writing documentation
DAX query view with CopilotYesWriting and testing DAX queries against the model

Copilot in Power BI needs Fabric capacity at F2 or above, or Premium P1 or above; see Copilot in Power BI. For the general assistants, our comparison of ChatGPT, Claude and Gemini covers strengths and pricing.

How do you write a good DAX prompt?

  • State the business rule: For example: “resolved on time means closed before the SLA deadline for its priority”.
  • List the tables and columns: Include data types and which columns are keys.
  • Describe relationships: Which table filters which, one-to-many or many-to-many, and any inactive relationships.
  • Say how it should behave: Under slicers, in totals, and when there is no data.
  • Ask for an explanation: Request a line-by-line explanation so you can review the logic.

Never paste confidential data rows into a public chatbot. Table and column names are usually enough, and your organisation’s AI policy should say which tools are approved. Our AI usage policy template can help.

Where does AI help most?

  • Time intelligence: Year-to-date, previous period, rolling 12 months and year-on-year change.
  • Ranking and top N: RANKX patterns and dynamic top-N with an “others” bucket.
  • Explaining inherited DAX: Turning a 40-line measure into plain English before you change it.
  • Refactoring: Replacing nested IFs with SWITCH, adding variables and DIVIDE.
  • Documentation: Writing measure descriptions, which also help Copilot answer questions.
  • Test queries: Drafting DAX queries that list values so you can check a measure.

What mistakes does AI make with DAX?

Each of these produces a number that looks reasonable, which is why testing matters more than reading the code.

How do you test an AI-written measure?

  • Compare with a trusted number: Check one month or one region against a finance or operations report.
  • Test edge cases: Months with no data, new categories and filtered-out items.
  • Check totals: Make sure the grand total matches the sum or the intended logic.
  • Try every slicer: Date, region and any role-based filters.
  • Document the rule: Add a description in plain English so others know what it means.

What does this look like in practice?

In a service-reporting suite such as the one we built for Omantel, measures like SLA compliance, closure rate and average response time had to mean the same thing on every page and be compared with last year. AI can draft those measures quickly, but the definitions had to be agreed with service leads first, and every measure was checked against figures the teams already trusted. That is the right split: people define and verify, AI drafts.

How should a BI team adopt AI for DAX?

Start with explaining and documenting existing measures, which is low risk and builds trust in the tools. Then use AI for drafting new measures, with a rule that every measure is tested and reviewed by a second person before it reaches a published report. Keep a shared library of approved patterns, such as your standard year-on-year measure, so the AI and the team reuse the same logic. Review the semantic model regularly, because good names and descriptions improve both human understanding and Copilot answers.

It also helps to agree which tools are approved for which tasks. Many teams allow Copilot inside Power BI for anything, and general chatbots only for model structure and anonymised examples. Write that down, so new analysts know the rule from day one.

How UIUX Studio helps

We build Power BI semantic models, measures and reports, and train teams to use AI tools safely. See our Technology Advisory service or read about Power BI report design.

Frequently asked questions

Is Copilot better than ChatGPT for DAX?

Copilot sees your model directly, which helps; general chatbots can be stronger for long explanations.

Can I paste my data into ChatGPT?

Only if your policy allows it. Table and column names are usually enough.

Does AI understand filter context?

Partly. It is the most common source of errors, so test carefully.

Can AI fix a slow measure?

It can suggest variables and simpler patterns; check with Performance Analyzer.

Should AI write measure descriptions?

Yes, it is a quick win that also helps Copilot.

Related articles

{{ p.category }} {{ t }}

{{ p.title }}

{{ p.excerpt }}

U{{ author.name }} {{ p.readMins }} min read
{{ p.category }}
{{ p.title }}
{{ mo.sub }}
{{ m.tag }}
{{ m.t }}
{{ m.d }}
{{ m.left.t }}✕{{ x.t }}
{{ m.right.t }}✓{{ x.t }}
{{ m.big }}{{ m.label }}
{{ x.t }}
{{ m.label }}
✓{{ x.t }}
{{ x.t }}
{{ m.label }}
{{ x.t }}
{{ m.status }}
{{ m.label }}
{{ x.t }}{{ x.n }}
{{ x.t }}
{{ m.label }}{{ m.stepTxt }}
{{ x.t }}
{{ m.btn }}
{{ x.t }}
{{ m.q }}
{{ m.a }}
{{ x }}
{{ k.n }}
{{ k.v }}
{{ m.label }}
{{ m.status }}
{{ m.label }}
{{ st.n }}{{ st.t }}
{{ m.hub }} {{ nd.t }}
AaAaAaAa
ButtonInput fieldTag
THE SHORT ANSWER

{{ p.answer }}

KEY TAKEAWAYS
  • ✓{{ k }}
RELATED SERVICES{{ l.t }}

{{ b.t }}

{{ g.t }}{{ g.t }}

{{ b.label }}:{{ b.t }}
{{ c.ini }}
{{ c.t }}
{{ c.d }}
  1. {{ s.n }}
    {{ s.t }}
    {{ s.d }}
{{ h }}
{{ c.t }}
{{ b.alt }}
{{ b.alt }}
{{ g.alt }}
{{ g.alt }}
{{ b.title }}
{{ c.t }}
{{ c.s }}
  • {{ i }}
{{ c.t }}{{ c.s }}
{{ b.caption }}
{{ s.v }}
{{ s.l }}
{{ s.s }}
{{ b.caption }}
{{ b.title }}
{{ b.unit }}
{{ r.l }}{{ r.d }}
{{ b.caption }}
{{ b.title }}
A{{ b.a.t }}
  • {{ i }}
B{{ b.b.t }}
  • ✓{{ i }}
{{ b.caption }}
{{ b.title }}
  1. {{ t.d }}
    {{ t.t }}
{{ b.caption }}
“
{{ b.t }}
{{ b.by }}
{{ b.title }}
{{ r.d }}
{{ r.l }}
{{ b.caption }}
{{ b.title }}
{{ m.n }}
{{ b.lo }}{{ b.hi }}
{{ m.n }}
{{ m.l }}
{{ m.d }}
{{ b.caption }}
{{ b.cs.client }} case study
Case study · {{ b.cs.client }} {{ b.cs.title }} {{ b.cs.text }}
{{ f.v }}{{ f.l }}
View case study →
SOURCES AND FURTHER READING
  1. {{ s.t }}

Frequently asked questions

{{ f.a }}

U
Written by {{ author.name }}
{{ author.role }}

Keep reading

More articles from across design, AI and marketing.

All articles
{{ r.category }} · {{ r.readMins }} min{{ r.title }}

For Ambitious Founders

Startup Strategy Session Discuss Your Project with Our Senior Experts

  • No Obligation
  • Expert Insights
  • Tailored Guidance