OpenBI Docs Buy

TOTALQTD

An expression evaluated over the quarter to date.

Group: Time intelligence. Compatible with DAX.

Syntax

TOTALQTD ( <expression>, <dates> [, <filter>] )
ParameterTypeDescription
expressionExpressionThe value wanted, usually a measure; it is evaluated with the dates as its filter.
datesDatesA column of dates of the model, such as Sales[Month], or the name of a calendar defined in the model.
filterFilter
optional
A condition or a table that filters as well, as a filter argument of CALCULATE does.

Returns

Same type as the expression. The expression over the quarter to date.

Remarks

  • It is CALCULATE ( expression, DATESQTD ( dates ) ), with the filter added when one is given.
  • The quarter is the calendar quarter of the last date in the filter context.
  • A filter on another column of the same table (a month or a year column next to the dates) stays in place. Where the dates column links a date table to the facts, a filter on it replaces the filters on the rest of that table, so results by year and month name add up as expected.
  • Given a calendar instead of a column, it works on the calendar's own periods (fiscal years, retail months of four or five weeks, ISO weeks). A filter on a category the calendar does not define, such as a month on a calendar of weeks, can make the call an error.

Examples

Year, quarter and month to date

EVALUATE
SUMMARIZECOLUMNS (
    Sales[Month],
    FILTER ( VALUES ( Sales[Month] ), Sales[Month] >= DATE ( 2025, 10, 1 ) && Sales[Month] <= DATE ( 2026, 2, 1 ) ),
    "Liters", [Liters sold],
    "Year to date", TOTALYTD ( [Liters sold], Sales[Month] ),
    "Quarter to date", TOTALQTD ( [Liters sold], Sales[Month] )
)
ORDER BY Sales[Month]
Sales[Month]LitersYear to dateQuarter to date
2025-10-014703750655147037
2025-11-014662555317693662
2025-12-0150177603353143839
2026-01-01455494554945549
2026-02-01459859153491534

DATESQTD, TOTALYTD, TOTALMTD, CALCULATE.

Last updated · OpenBI Studio 0.3.74