Date.EndOfQuarter

Updated on

Date.EndOfQuarter is a Power Query M function that returns the end of the quarter, preserving time zone information. The function returns the end of the quarter as a date, datetime, or datetimezone value.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365

Syntax

Date.EndOfQuarter( dateTime as any ) as any

Description

Date.EndOfQuarter calculates the end of the quarter for a dateTime parameter (of type date, datetime, or datetimezone), preserving time zone information.

Examples

Find the end of the quarter for October 10th, 2011, 8:00AM.

// Output: #datetime( 2011, 12, 31, 23, 59, 59.9999999 )
Date.EndOfQuarter( #datetime( 2011, 10, 10, 8, 0, 0 ) )

Learn more about Date.EndOfQuarter in the following articles:

Other functions related to Date.EndOfQuarter are:

BI Gorilla Youtube Channel

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/date-endofquarter