What it does
In Power BI, a measure is a formula that is worked out again for every bar, row or card in a report. The common ones (year over year change, running total, percent of total, moving average, rank) follow patterns that are easy to get wrong. This page builds them from the table and column names you type, and explains each piece in plain words.
Nothing you type leaves your browser. For the same idea in a spreadsheet use the excel formula, and to practise the queries behind a report try SQL playground or look at your file first in CSV profiler.
How to use it
- Choose the measure you want.
- Type the base measure name and the table and column that hold your numbers; for time measures also the date table and column; for percent and rank, the category table and column.
- Read the explanation under the code, then press Copy DAX and paste it into Home, New measure in Power BI Desktop.
- For percentage measures, set the format to Percentage in the Measure tools tab.
What each setting does
- Base measure: a total such as
Total Sales = SUM(Sales[Amount]). The other measures use it so the logic lives in one place. - Date table and column: must be a real calendar table with one row per day, marked as a date table, for time functions to work.
- Moving average window: how many days or months to average over. The sum over the window is divided by that number.
- Share of: the grand total, or what the visual currently shows (ALLSELECTED).
- Rank order: biggest is 1, or smallest is 1. Ties share a rank.
Worked example
With quantities 2 and 2 in 2024 (Jan, Feb) and 4 and 5 in 2025, the year over year measure shows blank for 2024, 4 / 2 - 1 = 100% for January 2025 and 5 / 2 - 1 = 150% for February 2025. A running total gives 2, 4, 8, 13. Drinks sell 9 of 13 units, so its % of total is 69.2%.
FAQs
Why DIVIDE instead of the / sign? DIVIDE returns blank when the bottom is zero or blank, so you do not get an error in the first year.
Why is my year over year all blank? The date table is missing days, or is not related to your fact table’s date column.
Does this work in Excel’s Power Pivot? Yes; the DAX is the same.
Where the numbers come from
- Microsoft DAX function reference (learn.microsoft.com/dax): CALCULATE, SAMEPERIODLASTYEAR, DATESINPERIOD, RANKX, DIVIDE, ALL, ALLSELECTED and FILTER. Patterns are the standard ones from Microsoft's documentation.
- Each generated pattern is checked in fibub's tests by running it on a small model in the DAX engine used by fibub's Power BI course.
Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.
Last updated 2026-12-05.