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

Date Formatting in Custom Columns

Hi all!

Can anyone tell me how to format a date field using a Custom Column where the date is formatted to MMM-YYYY?

1 ACCEPTED SOLUTION

go to the table that contains the date column

select the date column

column tool tab will appear

in the format, enter mmm-yyyy "in small letters" as below image

Untitled.png

 

tell me what you got, this should work

 

View solution in original post

8 REPLIES 8
amitchandak
Super User
Super User

Month Year = FORMAT([Date],"mmm-yyyy")

also create a sort column and made it sort column
Month Year sort = FORMAT([Date],"yyyymm")

 

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

Anonymous
Not applicable

Ok, I'm getting the following error message:

 

 
Expression.Error: The name 'Format' wasn't recognized. Make sure it's spelled correctly.

 

And below is my custom column formula:

= Table.AddColumn(#"Changed Type1", "Month Year", each Format([dReceievedDate],"MMM-YYYY"))

 

your formula in M (Power Query)

the formula was given to you is DAX

Anonymous
Not applicable

Thanks this explians everything, I'm very knew to PowerBI, where and when is Dax used?

 

I'm trying to create a seperate column which shows the date as MMM-YYYY, do you have any step by step instructions on how I do this if it's not done via a Custom Column?

 

Many Thanks

which version do you use? is it March 2020 version?

you can find it from File>About>Version

 

Anonymous
Not applicable

Hi Amaniramahi,

 

 

I use the following version

Version: 2.79.5768.1082 64-bit (March 2020)

go to the table that contains the date column

select the date column

column tool tab will appear

in the format, enter mmm-yyyy "in small letters" as below image

Untitled.png

 

tell me what you got, this should work

 

Anonymous
Not applicable

Hi Amanirmahi,

 

This works perfectly thank you!

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.