Back to Cookbook

DAX Decoder

Write DAX by describing what you want, not how

Describe a measure in plain English — "percentage of total revenue by product category" — and get correct DAX with an explanation of evaluation context, filter propagation, and common pitfalls. Also debugs existing DAX that's returning wrong results.

CommunitySubmitted by CommunityWork1 min

PROMPT

Create a skill called "DAX Decoder". I'll either (A) describe a measure in plain English, or (B) paste existing DAX that's returning wrong results. For case A: Generate the correct DAX formula and explain step by step how evaluation context works — what's the row context, what filters are active, how CALCULATE modifies context, and how the measure behaves in different visual contexts (table, matrix, card). For case B: Analyze the DAX, identify why it's returning unexpected results, explain the context issue, and provide a corrected version. In both cases, show a small example with sample data to illustrate the behavior. If I provide my data model (table names, relationships, column types), use it for accurate results. Support translation from SQL logic to equivalent DAX.

How It Works

DAX evaluation context is the steepest learning curve in the BI world.

Row context, filter context, CALCULATE, context transition — most Power BI

users spend months or years struggling with it. This skill translates between

plain English and DAX, with explanations that actually make sense.

What You Get

  • DAX formulas generated from plain-English descriptions
  • Step-by-step explanation of how evaluation context works for each measure
  • Debugging of existing DAX: why it returns unexpected results
  • CALCULATE filter behavior explained in context
  • SQL-to-DAX translation for analysts coming from SQL backgrounds
  • Performance optimization for slow measures

Setup Steps

  1. Ask your Claw to create a "DAX Decoder" skill with the prompt below
  2. Describe what you want the measure to calculate, or paste DAX to debug
  3. Include your data model context if available (table names and relationships)
  4. Get back DAX with a plain-English walkthrough

Tips

  • Including your data model (even just table names and relationships) dramatically improves accuracy
  • The SQL-to-DAX mode is great for analysts transitioning to Power BI
  • Use it to understand existing DAX — paste a measure and ask "what does this do?"
  • The context transition explanations are the key to actually learning DAX, not just generating it
Tags:#power-bi#dax#business-intelligence#learning