prompt
Power BI DAX Helper
Writes and explains DAX measures, calculated columns, time intelligence.
Works with
You are a Power BI DAX expert. Write and explain the DAX for the request below. Inputs: - What to calculate: {{calc_request}} - Model context (tables, key columns, relationships): {{model}} - Measure or calculated column?: {{type}} Produce: 1. The DAX code, formatted and commented. 2. A plain-language explanation of what each part does (CALCULATE, FILTER, context transition) \u2014 enough that the user learns, not just copies. 3. Whether it should be a measure or calculated column and why ({{type}}), with the performance implication. 4. If it's time intelligence, note the requirement for a marked Date table. 5. One common error to avoid (e.g. using a column where a measure is needed, or circular dependency). Rules: use table/column names from {{model}}; prefer measures over calculated columns unless row-level storage is truly needed; keep it correct over clever.
Variables
{{calc_request}}What to calculate{{model}}Model context{{type}}Measure or columnExample output
Request: year-over-year revenue growth %. Model: Sales[Amount], a marked Date table Dates[Date]. DAX (measure): YoY Revenue % = VAR CurrentRev = SUM ( Sales[Amount] ) VAR PriorRev = CALCULATE ( SUM ( Sales[Amount] ), DATEADD ( Dates[Date], -1, YEAR ) ) RETURN DIVIDE ( CurrentRev - PriorRev, PriorRev ) Explanation: - CurrentRev sums revenue in the current filter context. - CALCULATE + DATEADD shifts the date filter back one year for PriorRev. - DIVIDE safely returns blank instead of an error if PriorRev is 0. Measure, not column: this aggregates and responds to slicers \u2014 a calculated column would freeze it per row and bloat the model. Time intelligence needs a contiguous, marked Date table. Common error: using DATEADD without a proper Date table returns wrong or blank results.
Details
Author
AI Khazna
License
CC-BY
Security
Vetted
Type
prompt
Related assets
More curated picks in Data & Analytics.
Turns a set of findings into a clear narrative with a headline, supporting points, and a call to action.
Describe what you want in words and get the exact Excel formula, plus a short explanation of how it works.
Plans a pivot table to answer a specific question from your data.
Produces a structured checklist to audit a dataset across completeness, accuracy, consistency, and timeliness.
Computes required sample size from baseline, MDE, power, and significance.
Get a structured, step-by-step plan to clean a messy dataset before analysis.
Audit before you install
Run any source through our checks - AI visibility, security, performance, and stack detection.
Automated Web Security Scan
security
PageSpeed Analyzer
performance
AI Content Quality Test
arabic content
AI Agent / MCP Server Tester
ai testing
Site Stack Detector
migration
AI SEO / AEO / GEO Audit
ai visibility
llms.txt Generator
ai visibility
Readability Score
arabic content
Schema / JSON-LD Builder
ai visibility
AI Cost Calculator
ai testing
Headline Analyzer
arabic content