Ravindra BagaleCourses & study guides Track your progress

Guides

TOTALMTD and TOTALQTD in Power BI DAX

TOTALMTD and TOTALQTD accumulate a measure within the current month or quarter — same Date-table discipline as YTD, just a finer reset grain.

Chala mitrano! After YTD, managers ask for “this month so far” and “this quarter so far”. Why? Different meetings, different grains. How? We add TOTALMTD and TOTALQTD beside YTD on FreshBasket (fictional) dates. Short family reunion — keep labels honest.

Quick answer

Vertical family:

  1. Confirm YTD already works on a marked Date table.
  2. Sales MTD = TOTALMTD ( [Total Sales], 'Date'[Date] ).
  3. Sales QTD = TOTALQTD ( [Total Sales], 'Date'[Date] ).
  4. Cards or matrix: MTD, QTD, YTD together.
  5. Drill one month — MTD tracks month; YTD still year.
  6. Title visuals so readers never confuse grains.
TOTALMTD ( [Total Sales], 'Date'[Date] )
TOTALQTD ( [Total Sales], 'Date'[Date] )

Why MTD / QTD, rows in / number out

Same year, day grain inside February:

Date Amount
1 Feb 100
10 Feb 40
20 Feb 80
  1. Why MTD: “How is this month doing so far?”
  2. On 20 Feb, plain day sales might show 80.
  3. MTD expands from 1 Feb through 20 Feb. Rows in: all three. Number out: 220.
  4. On 10 Feb, MTD = 140 (100 + 40).
  5. Why QTD: same idea for the quarter window. Q1 resets at 1 Jan (calendar).
  6. YTD still runs the whole year. Same Date table. Different reset.
TOTALMTD Month-to-date accumulates within the current month. Month start TOTALMTD MTD mtd

TOTALMTD accumulates within the current month under the date filter context.

What do I need before this guide?

Before and after (look at the tables first)

Before MTD March day rows totaling 100.

Before

After TOTALMTD MTD through Mar 10 equals 70.

After

TOTALMTD

Sales MTD =
TOTALMTD (
    [Total Sales],
    'Date'[Date]
)
  1. Resets when the month changes.
  2. Useful on day-level axes inside a month.
  3. A jump down on the 1st is a reset, not a bug.

TOTALQTD

TOTALQTD Quarter-to-date accumulates within the current quarter. Q start TOTALQTD QTD qtd

TOTALQTD accumulates within the current quarter — sibling of MTD and YTD.

Sales QTD =
TOTALQTD (
    [Total Sales],
    'Date'[Date]
)
  1. Resets at quarter boundaries.
  2. Pair with Quarter on a slicer or hierarchy.
  3. Same relationship rules as YTD.

Family portrait

MTD QTD YTD family Same idea at three grain levels: month, quarter, year. TOTALMTD TOTALQTD TOTALYTD family

Family portrait: TOTALMTD / TOTALQTD / TOTALYTD — same pattern, three grains.

  1. MTD = month window.
  2. QTD = quarter window.
  3. YTD = year window.
  4. Same base measure, different calendars of accumulation.

Phone-bill analogy: MTD is this month’s bill so far. QTD is the quarter plan tracker. YTD is the year plan tracker.

Mistakes and calm fixes

Symptom Likely cause Fix
MTD = YTD always Wrong dates / grain Check Date axis and relationships
Jump at month start Expected That is a reset, not a bug
Blank Date table issue Fix mark + relationship first
Misread by stakeholders Vague titles Label “Month to date” explicitly

Ghabru naka 😅 — if YTD is broken, MTD will not magically heal it.

Ravindra Bagale's Tip

Many students put MTD and YTD on one card without labels. Readers invent stories. Name the measure Sales MTD / Sales YTD and mirror that in the visual title. Keep this in mind!

Practice task

  1. Add Sales MTD and Sales QTD.
  2. Build a page with MTD, QTD, YTD cards.
  3. Slice to one quarter; write what each card means.
  4. Change to day level for one month; watch MTD climb to 140 mid-month on a sample like above.
  5. Screenshot titles that a non-DAX manager would understand.

Learn it properly

Course lessons:

Related guides: YTD · YoY

Got it? MTD resets monthly; QTD quarterly; YTD yearly. Same Date table. Next: last year and YoY %. Let's continue.

Frequently asked questions

What is TOTALMTD?

Month-to-date evaluation of an expression over a dates column.

What is TOTALQTD?

Quarter-to-date evaluation — accumulates from the start of the quarter.

Do I need DATESMTD?

There are DATES* siblings used with CALCULATE; TOTALMTD/TOTALQTD are the friendly wrappers.

MTD resets when?

When the month (in filter context) changes — that is the point of MTD.

Same Date table as YTD?

Yes — one marked Date table for the whole time intelligence family.

Course lesson?

Time intelligence in the DAX chapter.