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:
- Decide the reset grain (start with year).
Running Sales = CALCULATE ( [Total Sales], DATESYTD ( 'Date'[Date] ) ).- Put Date (day or month) on rows/axis.
- Within a year, values should be non-decreasing as dates advance (for positive sales).
- Show Total Sales beside it to contrast periodic vs cumulative.
- 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 |
- Why: managers watch the climb, not only spikes.
- On 12 Jan, plain
[Total Sales]for that day = 40. - Running total expands dates from year start through 12 Jan. Rows in: 5 Jan + 12 Jan. Number out: 140.
- On 20 Jan, running total = 220.
- Same DATESYTD engine you met in the YTD guide — on a continuous date axis it reads as a running total.
A running total shows cumulative sales (or orders) from period start through each date on the axis.
मित्रांनो — A running total shows cumulative sales (or orders) from period start through each date on the axis.
मित्रों — A running total shows cumulative sales (or orders) from period start through each date on the axis.
What do I need before this guide?
- YTD.
- Course: Time intelligence.
Before and after (look at the tables first)
Before
आधी (Before)
पहले (Before)
After
नंतर (After)
बाद में (After)
What “running” means
- Day 1 = day 1 sales.
- Day 2 = day 1 + day 2.
- And so on through the period.
- 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
Common year running total: CALCULATE ( [Total Sales], DATESYTD ( 'Date'[Date] ) ) on a date axis.
मित्रांनो — Common year running total: CALCULATE ( [Total Sales], DATESYTD ( 'Date'[Date] ) ) on a date axis.
मित्रों — Common year running total: CALCULATE ( [Total Sales], DATESYTD ( 'Date'[Date] ) ) on a date axis.
Running Sales YTD =
CALCULATE (
[Total Sales],
DATESYTD ( 'Date'[Date] )
)
- Yes — it looks like the YTD measure on purpose.
- On a continuous date axis it reads as a running total for the year.
- TOTALYTD is a sibling wrapper you already met.
On a matrix
Put Date on matrix rows and the running measure on values — each row should be ≥ the previous in a rising year.
मित्रांनो — Put Date on matrix rows and the running measure on values — each row should be ≥ the previous in a rising year.
मित्रों — Put Date on matrix rows and the running measure on values — each row should be ≥ the previous in a rising year.
- Rows: Date[Date] or Month.
- Values: Running Sales YTD (+ optional Total Sales).
- 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!
Ravindra Bagale's Tip – मराठी
Students Date table mark करण्याआधी FILTER आणि MAX date वाले fancy running-total blogs मागे लागतात. आधी DATESYTD ने ramp करा; नंतर sprint. लक्ष ठेवा!
Ravindra Bagale's Tip – हिंदी
Students Date table mark करने से पहले FILTER और MAX date वाले fancy running-total blogs के पीछे भागते हैं. पहले DATESYTD से चलो; बाद में sprint. ध्यान रखो!
Practice task
- Create Running Sales YTD.
- Day-level matrix for one year.
- Confirm non-decreasing cumulative sales (hit 140 mid-sample).
- Add Total Sales column for contrast.
- Switch Year slicer; confirm reset.
Got it? Running total = cumulative along Date; DATESYTD is the friendly year pattern. Next: RANKX. Let's continue.
समजलं का? Running total = cumulative along Date; DATESYTD is the friendly year pattern. Next: RANKX. Aata pudhe jaauya.
समझ में आया? Running total = cumulative along Date; DATESYTD is the friendly year pattern. Next: RANKX. आगे बढ़ते हैं.
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.