Ravindra BagaleCourses & study guides Track your progress

Guides

Running Totals in Power BI DAX

A running total is a cumulative measure along a date axis — in Power BI, a common year running total uses CALCULATE with DATESYTD (the same engine behind many YTD patterns).

Chala mitrano! Line charts love climbing totals. Why? Stakeholders watch momentum, not only daily spikes. How? We build a year running total with DATESYTD, plant it on a FreshBasket (fictional) date matrix, and compare it to plain Total Sales. Cumulative calm.

Quick answer

Vertical build:

  1. Decide the reset grain (start with year).
  2. Running Sales = CALCULATE ( [Total Sales], DATESYTD ( 'Date'[Date] ) ).
  3. Put Date (day or month) on rows/axis.
  4. Within a year, values should be non-decreasing as dates advance (for positive sales).
  5. Show Total Sales beside it to contrast periodic vs cumulative.
  6. Year slicer restarts the cumulative story.
CALCULATE ( [Total Sales], DATESYTD ( 'Date'[Date] ) )

Why running totals, rows in / number out

Date Day sales Running (YTD)
5 Jan 100 100
12 Jan 40 140
20 Jan 80 220
  1. Why: managers watch the climb, not only spikes.
  2. On 12 Jan, plain [Total Sales] for that day = 40.
  3. Running total expands dates from year start through 12 Jan. Rows in: 5 Jan + 12 Jan. Number out: 140.
  4. On 20 Jan, running total = 220.
  5. Same DATESYTD engine you met in the YTD guide — on a continuous date axis it reads as a running total.
Running total idea Each date shows the sum from the start of the period through that date. D1 D1+D2 …cumul Running total cumul

A running total shows cumulative sales (or orders) from period start through each date on the axis.

What do I need before this guide?

Before and after (look at the tables first)

Before running total Three monthly amounts without running total.

Before

After running total Running total climbs to 190.

After

What “running” means

  1. Day 1 = day 1 sales.
  2. Day 2 = day 1 + day 2.
  3. And so on through the period.
  4. Managers see shape, not only spikes.

Shop analogy: the till counter that never resets until New Year. Each day’s sales still exist; the running card adds them up.

DATESYTD pattern

Running with DATESYTD CALCULATE with DATESYTD (or similar) builds a year running total. CALCULATE DATESYTD Run YTD run

Common year running total: CALCULATE ( [Total Sales], DATESYTD ( 'Date'[Date] ) ) on a date axis.

Running Sales YTD =
CALCULATE (
    [Total Sales],
    DATESYTD ( 'Date'[Date] )
)
  1. Yes — it looks like the YTD measure on purpose.
  2. On a continuous date axis it reads as a running total for the year.
  3. TOTALYTD is a sibling wrapper you already met.

On a matrix

Running total on a matrix Date on rows and running measure on values — watch it climb. Date Running Sales 01-Jan 10k 02-Jan 18k matrix

Put Date on matrix rows and the running measure on values — each row should be ≥ the previous in a rising year.

  1. Rows: Date[Date] or Month.
  2. Values: Running Sales YTD (+ optional Total Sales).
  3. Scan down the column — it should climb inside the year (to 140, then 220 on the sample).

Mistakes and calm fixes

Symptom Likely cause Fix
Drops mid-year Wrong date field / new year Use Date table; check Year
Equals Total Sales always Not cumulative filter Confirm DATESYTD / TOTALYTD
Explodes Bad relationship Fix Date relationship
Too advanced too soon Custom FILTER windows Master DATESYTD first

Ghabru naka 😅 — if YTD is wrong, the “running total” is the same patient Date-table problem.

Ravindra Bagale's Tip

Students chase fancy running-total blogs with FILTER and MAX date before their Date table is marked. Crawl with DATESYTD; sprint later. Pay attention!

Practice task

  1. Create Running Sales YTD.
  2. Day-level matrix for one year.
  3. Confirm non-decreasing cumulative sales (hit 140 mid-sample).
  4. Add Total Sales column for contrast.
  5. Switch Year slicer; confirm reset.

Learn it properly

Course lessons:

Related guides: YTD · RANKX

Got it? Running total = cumulative along Date; DATESYTD is the friendly year pattern. Next: RANKX. Let's continue.

Frequently asked questions

What is a running total?

A cumulative sum from the start of a period through the current date on the axis.

Is TOTALYTD a running total?

Year-to-date is the most common running-total shape for calendar years.

Other patterns?

Advanced windows use FILTER on dates ≤ max date — learn after DATESYTD feels solid.

Why does it jump down?

New year reset, or the axis is not the Date table you filtered.

Performance tip?

Keep Date tables lean and avoid unnecessary bidirectional filters while learning.

Course lesson?

Time intelligence — running total / YTD patterns in the DAX chapter.