How do I extract the month from a date in Power BI?

To extract the month from a date in Power BI, you will need to use the DAX function called “MONTH”. This function allows you to extract the month from a given date and returns a number representing the month. For example, if the date is January 1st, the function will return the number 1. This allows you to easily sort and analyze your data by month. To use this function, you will need to create a new column in your data table and use the MONTH function to reference the date column. This will then display the month for each corresponding date in your data. You can also use other DAX functions such as “FORMAT” to display the month as a text value instead of a number. This feature in Power BI is useful for organizing and visualizing data by month, allowing for better insights and analysis.

Power BI: 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 .

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