Power BI: How to Extract Month from Date


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 here.

Example 2: Extract Month Name from Date in Power BI

Suppose that we would like to extract the month name 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 = 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 here.

Additional Resources

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

Power BI: How to Convert Date to Text
Power BI: How to Get Day of Week from Date
Power BI: How to Convert Date to Month and Year Format

Leave a Reply

Your email address will not be published. Required fields are marked *