Date.EndOfQuarter
The last day of the calendar quarter a date falls in.
Group: Dates and times. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
Date.EndOfQuarter(dateTime as any) as any
| Parameter | Type | Description |
|---|---|---|
dateTime | any | A date, datetime or datetimezone value; null gives null. |
Returns
any. The same kind of value, on 31 March, 30 June, 30 September or 31 December.
Remarks
- For a datetime or datetimezone the answer is the last moment of that day, 23:59:59.9999999; for a date it is the date.
Examples
Quarter end for an August sale
Date.EndOfQuarter(#date(2024, 8, 20))
#date(2024, 9, 30)
Days left in the quarter
Duration.Days(Date.EndOfQuarter(#date(2024, 8, 20)) - #date(2024, 8, 20))
41
Related functions
Date.StartOfQuarter, Date.QuarterOfYear, Date.EndOfMonth, Date.EndOfYear.