How can I extract the month from a date using Power BI?

To extract the month from a date in Power BI, you can use the DAX function MONTH(). This function takes a date or datetime column as its argument and returns the month number as an integer. You can then use this month number to create visuals, filters, or other calculations based on the month. This allows you to easily analyze and visualize data by specific months, such as sales trends or customer behavior, within your Power BI reports.


You can use the following methods in DAX to extract the month from a date in Power BI:

Method 1: Extract Month Number from Date

month = MONTH('my_data'[Date]) 

Method 2: Extract Month Name from Date

month = FORMAT('my_data'[Date], "MMM") 

The following examples show how to use each method in practice with the following table named my_data in Power BI:

Example 1: Extract Month Number from Date in Power BI

Suppose that we would like to extract the month number from each date in the Date column.

To do so, click the Table tools tab, then click the icon called New column:

Then type the following formula into the formula bar:

month = MONTH('my_data'[Date])

This will create a new column named month that contains only the month number from the the corresponding date in the Date column:

Note: You can find the complete documentation for the MONTH function in DAX .

Example 2: Extract Month Name from Date in Power BI

To do so, click the Table tools tab, then click the icon called New column:

Then type the following formula into the formula bar:

month = FORMAT('my_data'[Date], "MMM")

This will create a new column named month that contains only the month name from the the corresponding date in the Date column:

Note #1: If you would rather extract the full month name, then you should use “MMMM” in the FORMAT function instead.

Note #2: You can find the complete documentation for the FORMAT function in DAX .

Additional Resources

The following tutorials explain how to perform other common tasks in Power BI:

x