Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Del235
Helper II
Helper II

convert date to month name

How do I convert date to month name?  I see the dax to convert date to month number but not month name

 

4 ACCEPTED SOLUTIONS
StuartSmith
Power Participant
Power Participant

You could try... and change to the desired format.

StuartSmith_0-1706043203166.png

 

View solution in original post

In the data view,

create two columns. one for month number and other for month name. 

Month Number = Format([YourDate], "MM")
Month Name = Format([YourDate], "MMM")

 

select the month name column, in the column tools menu, click "Sort by column". Here, by default it will show the month name column. Now, you click "Month number" column. 

sevenhills_0-1706063753060.png

 

In all your visuals of month name, it will be sorted by Month number.

 

Optional: you can hide the month number column for the users.

 

Hope it helps!

View solution in original post

Hello @Del235 ,

 

can you show us what do you have, the scenario you're working on so we could help.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




View solution in original post

I have something like this, so this does work.  I didn't want two columns. 

View solution in original post

9 REPLIES 9
Anonymous
Not applicable

Hi @Del235 ,

You could try @StuartSmith's suggestion to format the date column, for Format() function, it will return a text type value.

If you want to sort the month from Jan to Dec, you could try @sevenhills 's suggestion, create a new column with month number, sort the month number column, then sort the month name column by month number column.

 

Note: In Power BI, for text value, it sort by the ascii value.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

LokambaTH
Helper I
Helper I

Hi,

Use the below code:

 

MonthName = FORMAT(Table[Date], "MMM")

Del235
Helper II
Helper II

How do I make the data type date?  What I'm trying to do is get the Month name to to sort as Jan - Dec.  This leaves it as text and sorts alphabetically

Hello @Del235 ,

 

can you show us what do you have, the scenario you're working on so we could help.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




In the data view,

create two columns. one for month number and other for month name. 

Month Number = Format([YourDate], "MM")
Month Name = Format([YourDate], "MMM")

 

select the month name column, in the column tools menu, click "Sort by column". Here, by default it will show the month name column. Now, you click "Month number" column. 

sevenhills_0-1706063753060.png

 

In all your visuals of month name, it will be sorted by Month number.

 

Optional: you can hide the month number column for the users.

 

Hope it helps!

I have something like this, so this does work.  I didn't want two columns. 

StuartSmith
Power Participant
Power Participant

You could try... and change to the desired format.

StuartSmith_0-1706043203166.png

 

Idrissshatila
Super User
Super User

Hello @Del235 ,

 

use the following code

 

Month Name = FORMAT('YourTableName'[Date],"MMMM")


Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




sayaliredij
Super User
Super User

HI @Del235 

 

You can use

 

Monthname = FORMAT('Table'[date_column], "MMM")

 

Thanks and Regards,

Sayali

Please mark the question solved when done and consider giving a thumbs up if posts are helpful!! 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.