DashPrompts
Try it free

Free Power BI Time Intelligence Generator

Pick a pattern — YTD, MTD, QTD, year-over-year, running total, rolling average — fill in your real table and column names, get back correct DAX. No AI guesswork: these are fixed, well-known time intelligence patterns.

DAX YTD, MTD, and QTD

Year-to-date, month-to-date, and quarter-to-date are the three most common DAX time intelligence measures -- each resets to zero at the start of its period and accumulates up to whatever date is selected. They're built on Power BI's own TOTALYTD, TOTALMTD, and TOTALQTD functions, which handle the period boundaries correctly as long as your date column is a real, continuous date column (a proper date table, not just a "Jan"/"Feb" text column).

Year-over-year DAX and SAMEPERIODLASTYEAR

A year-over-year comparison in DAX almost always comes down to one function: SAMEPERIODLASTYEAR, which shifts the current filter context back exactly one year without hardcoding any dates. This tool uses it two ways -- as a plain "prior year" measure, or wrapped in a VAR/RETURN with DIVIDE for a clean year-over-year growth percentage that doesn't error out when there's no prior-year data.

DAX running total and rolling average

A running total DAX measure has no reset point -- it just keeps accumulating, using FILTER and ALLSELECTED so it still respects whatever other filters (a region slicer, say) are active on the page. A rolling average is different: it averages a moving window of days (commonly 7, 28, or 90) using DATESINPERIOD, smoothing out day-to-day noise without a fixed calendar boundary.

A worked example

Pick Year-over-Year Growth %, table Sales, date column Order Date, value column Revenue, aggregation Sum. This generates a measure with two VARs -- current-period revenue and the same period last year via SAMEPERIODLASTYEAR -- then returns DIVIDE() of the difference over last year's value, so a year with no prior data shows blank instead of an error.

Questions

Is this free?

Yes, completely free, no account or signup needed.

Does this use AI?

No -- YTD, MTD, QTD, year-over-year, running total, and rolling average are fixed, well-documented DAX patterns. A picker and your real column names are enough to produce correct DAX every time, with nothing for a model to get wrong.

Does my date column need to be a proper date table?

It needs to be a real, continuous date/datetime column at minimum -- these DAX time intelligence functions rely on that to find period boundaries correctly. A dedicated marked date table is best practice but not strictly required for most of these patterns to work.

What's the difference between running total and rolling average?

A running total never resets and keeps growing forever (good for cumulative totals). A rolling average only looks at a fixed recent window (like the last 7 or 28 days) and moves forward with the selected date -- good for smoothing out noisy day-to-day data.

I need a different kind of DAX measure entirely -- is there a tool for that?

Yes -- the DAX Formula Generator handles freeform metrics described in plain English, for anything outside these fixed time intelligence patterns.

Want the whole dashboard, not just one measure?

Upload your data, describe what you want, and get back a real, editable .pbip project today — free, no Fabric or Copilot license needed.

Try DashPrompts free →