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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Create a column for month name from month number

Hello,

I have the following table loaded in Power BI and i would like to have a corresponding column with month name instead of numbers.

I am thinking to create a calculated column with corresponding month name but i am not sure how to do this.

I would also like to present this data in a column chart with the X axis as month name, but how to sort it by month name in order from January to December?

Any help is much appreciated!

 

NameMonth
Lizui4
Laufenburg7
Tegalpapak8
Ar Rabiyah8
Gangarampur4
Bellegarde3
Luntas2
Seedorf10
Frei Paulo6
Bellegarde3
Gangarampur3
Cosamaloapan de Carpio7
Luntas2
Zagrodno9
Lizui4
Laufenburg11
Tegalpapak8
Ar Rabiyah5
Gangarampur3
Bellegarde3
Luntas5
Seedorf1
Frei Paulo6
Bellegarde12
Gangarampur3
Cosamaloapan de Carpio7
Luntas2
Zagrodno

9

 

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @Anonymous 

 

Add a new calculated column with this DAX:

Month Name =
FORMAT ( DATE ( 2022, 'Table'[Month], 1 ), "mmmm" )


Sample file attached.

VahidDM_0-1657420292704.png

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

 

View solution in original post

4 REPLIES 4
danextian
Super User
Super User

hI @Anonymous 

 

You can create a date using those number and then use FORMAT to get the month name:

Month Name = 
FORMAT ( DATE ( 2022, Data[Month Number], 1 ), "MMMM" )









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


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
VahidDM
Super User
Super User

Hi @Anonymous 

 

Add a new calculated column with this DAX:

Month Name =
FORMAT ( DATE ( 2022, 'Table'[Month], 1 ), "mmmm" )


Sample file attached.

VahidDM_0-1657420292704.png

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

 

Anonymous
Not applicable

@VahidDM Thanks for your reply! Is it possible to sort the month name in the correct order, starting from January and ending December?

MakeItReal_0-1657454272066.png

 

 

Hi @Anonymous 

 

Yes, try to sort your Month Name column with Month name, Check this link:
https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-sort-by-column?tabs=powerbi-desktop

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.