OpenBI Docs Buy

STARTOFQUARTER

Gives the column's earliest date in the quarter of the filter context.

Group: Time intelligence. Compatible with DAX.

Syntax

STARTOFQUARTER ( <dates> )
ParameterTypeDescription
datesDatesA column of dates of the model, such as Sales[Month], or the name of a calendar defined in the model.

Returns

Table. The quarter's first date that the column holds, as a table of one row.

Remarks

  • The quarter is the calendar quarter of the first date in the filter context; its first date is the first one the column has in it.
  • The table of one row can be used as a value; with no date in the context, it is blank.
  • Given a column, it reads the dates visible in the current filter context; in a row context, such as ADDCOLUMNS, the row becomes a filter first, so each row sees its own dates.
  • 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

Start and end of the quarter, by month

EVALUATE
SUMMARIZECOLUMNS (
    Sales[Month],
    FILTER ( VALUES ( Sales[Month] ), Sales[Month] >= DATE ( 2025, 2, 1 ) && Sales[Month] <= DATE ( 2025, 5, 1 ) ),
    "Start of quarter", STARTOFQUARTER ( Sales[Month] ),
    "End of quarter", ENDOFQUARTER ( Sales[Month] )
)
ORDER BY Sales[Month]
Sales[Month]Start of quarterEnd of quarter
2025-02-012025-01-012025-03-01
2025-03-012025-01-012025-03-01
2025-04-012025-04-012025-06-01
2025-05-012025-04-012025-06-01

ENDOFQUARTER, STARTOFMONTH, STARTOFYEAR, DATESQTD.

Last updated · OpenBI Studio 0.3.74