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
CMSINFO
Frequent Visitor

Date Format

Hi, I am new to Power BI, can anyone tell me how to add dates in the format JAN17, FEB17,MAR17? I don't see this format on Modeling -> Format.

 

Thanks!

2 ACCEPTED SOLUTIONS
ChrisMendoza
Resident Rockstar
Resident Rockstar

@CMSINFO -

 

As a calculated column you can format the date as:

 

Column = FORMAT(Table1[Date],"MMMYY")





Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



View solution in original post

PattemManohar
Community Champion
Community Champion

@CMSINFO  You can convert the date fields using FORMAT function. Try adding a new column as below

 

DateMMMYY = FORMAT(TableName[DateColumn],"MMMYY")




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

Proud to be a PBI Community Champion




View solution in original post

8 REPLIES 8
PattemManohar
Community Champion
Community Champion

@CMSINFO  You can convert the date fields using FORMAT function. Try adding a new column as below

 

DateMMMYY = FORMAT(TableName[DateColumn],"MMMYY")




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

Proud to be a PBI Community Champion




Thanks! It worked however now the columns are in alphabetical order not on cronological order, how to sort it out?

@CMSINFO Add an another new column (if table doesn't have one as below) and call it as SortKey

 

SortKey = FORMAT(Table[DateColumn],"YYYYMM")

 

Select the field that you want to sort on (in this case it is the field that you have created earlier i.e. MMMYY format) then click on "Sort By Column" option under "Modelling" tab use SortKey field

 

 





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

Proud to be a PBI Community Champion




It sorted the column in the Data but my report remains in alphabetical order, why?

@CMSINFO  For your reference...

 

image.pngimage.png





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

Proud to be a PBI Community Champion




 

The months on my matrix still in alphabetical order...image.png

 

@CMSINFO -

 

Is your calculated column [MMMYY] in the 'Date' Table (a proper date table) and the fact table with measures/etc. related to that 'Date' Table? Or are you trying to do all this within the fact table?

 

I'm guessing you need to share more of your model cause what's been suggested should work.

 

7.PNG

 

Fact Table

 

8.PNG

9.PNG

 

 

 






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



ChrisMendoza
Resident Rockstar
Resident Rockstar

@CMSINFO -

 

As a calculated column you can format the date as:

 

Column = FORMAT(Table1[Date],"MMMYY")





Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



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.

Top Solution Authors