Date.MonthName
DateReturns the name of the month for the given date.
Syntax
Date.MonthName(dateTime as any, optional culture as nullable text) as nullable textParameters
| Name | Type | Required | Description |
|---|---|---|---|
dateTime | any | Yes | A date, datetime, or datetimezone value. |
culture | text | No | A culture code such as "en-US" or "de-DE" that controls the language of the returned month name. |
Return Value
text — The localized name of the month (e.g., "March").
Remarks
Date.MonthName returns the full, localized name of the month for a given date, datetime, or datetimezone value. When no culture is provided, the host environment's locale is used. Always specify culture explicitly (e.g., "en-US") in production queries to ensure consistent output regardless of where the query runs.
For abbreviated month names (e.g., "Mar"), use Date.ToText with the format string "MMM" instead, which is more concise. If the input is null, the function returns null.
Date.MonthName returns only the display name — it does not return a sort key. If you need to sort by month, add a Date.Month column (numeric 1–12) alongside the month name column and sort by the number, then display the name. This is a very common pattern in Power BI date dimension tables.
Examples
Example 1: Add month name to a Sales date column
Table.AddColumn(
Table.SelectColumns(
Table.FirstN(Sales, 5),
{"OrderID", "OrderDate"}
),
"MonthName", each Date.MonthName([OrderDate], "en-US"), type text
)OrderID | OrderDate | MonthName | |
|---|---|---|---|
| 1 | 1 | 1/15/2024 | January |
| 2 | 2 | 1/18/2024 | January |
| 3 | 3 | 2/1/2024 | February |
| 4 | 4 | 2/10/2024 | February |
| 5 | 5 | 3/5/2024 | March |
Example 2: Month name in German
#table(
type table [Date = date, MonthDE = text],
{{#date(2024, 3, 15), Date.MonthName(#date(2024, 3, 15), "de-DE")}}
)Date | MonthDE | |
|---|---|---|
| 1 | 3/15/2024 | März |
Example 3: Add both month number and month name for sortable display
Table.AddColumn(
Table.AddColumn(
Table.SelectColumns(Table.FirstN(Sales, 5), {"OrderID", "OrderDate"}),
"MonthNum", each Date.Month([OrderDate]), Int64.Type
),
"MonthName", each Date.MonthName([OrderDate], "en-US"), type text
)OrderID | OrderDate | MonthNum | MonthName | |
|---|---|---|---|---|
| 1 | 1 | 1/15/2024 | 1 | January |
| 2 | 2 | 1/18/2024 | 1 | January |
| 3 | 3 | 2/1/2024 | 2 | February |
| 4 | 4 | 2/10/2024 | 2 | February |
| 5 | 5 | 3/5/2024 | 3 | March |