Free tool · No sign-up

DAX Measure Builder

One base measure in, a full set of time intelligence out: YTD, prior year, YoY %, rolling months, running totals, even Ramadan vs last Ramadan. Add them all to Power BI in one click.

1. Your base measure
2. Your date table

No date table yet? Generate one here first.

3. Pick your measures

              

In Power BI Desktop open DAX query view (left toolbar), paste, and click Update model with changes. Every measure is added in one go.


              

In Power BI Desktop open TMDL view (left toolbar), paste, and click Apply. Every measure is added with its number format, a display folder and a description. Needs Desktop from 2025 on.

For Modeling → New measure: copy each one and paste. Create them in this order.

Ramadan and Eid measures use the Hijri Year, Hijri Month Number, Hijri Day, Is Ramadan and Ramadan Day columns from the DataArcus calendar.

Measures are easy. The right numbers are not.

When totals don’t match, relationships double count, or YoY looks wrong, the problem is the model. DataArcus builds and fixes Power BI data models.

Guide: why YoY breaks in Ramadan, and the measure that fixes it →

Questions

How do I calculate year over year growth in DAX?

Make a prior-year measure with SAMEPERIODLASTYEAR, then use DIVIDE(current - prior year, prior year). DIVIDE returns blank instead of an error when last year has no data. Tick "YoY %" above and the builder writes both for you.

How do I add all the measures at once?

Use DAX query view in Power BI Desktop. Paste the whole script and click Update model with changes. Then set the % measures to Percentage format in the Measure tools ribbon.

My YTD or PY measure is blank. Why?

Time intelligence needs a real date table: one row per day, no gaps, marked as a date table, and related to your fact table. Use that table’s Date column on your visuals, not the date column from the fact table.

What is the difference between Rolling 3M and 30D Avg?

Rolling 3M adds up the last three months, which is great for smoothing seasonal sales. 30D Avg is the average per day over the last 30 days, which is better for trend lines on daily data.

How does Ramadan vs last Ramadan work?

Ramadan moves about 11 days earlier every year, so comparing March with March is misleading. The measure looks up the same Ramadan days in the previous Hijri year. Put Ramadan Day on the axis and you compare day 5 with day 5.