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
SachinC
Helper V
Helper V

Date Formula for MMM

Hi,

I have a Date field which I broke down using DAX for Day = day({fieldname]), Month = month([fieldname]) and Year = year([fieldname]).  I now want to format my numerical months in my charts to MMM, i.e. Jan, Feb etc... but the problem is:-

 1. I can't seem to convert my Month to MMM using Format([date], "MMM")- any pointers?

 2. How can I get my months in order, i.e. Jan, Feb etc....?

Regards,

S

 

6 REPLIES 6
v-caliao-msft
Employee
Employee

Hi @SachinC,

 

To sort your month in visual, click on the Modelling tab, and where it says Sort by Column, click on the Drop Down and select the Month Number column you created above.
large.jpg

 

Regards,

Charlie Liao

This is really odd, it doesn't work for me.

I've followed exactly what you've said, but it's strange I click my new DateID field, click Sort By in the ribbon bar but nothing happens.

Please help. Thanks.

Hi @SachinC

 

You have to have the field selected in the menu, or the column selected in the data view,  Then the Sort By Column should offer a dropdown.


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

really odd, still doesn't work. zzzzzzzzzz.PNG

really odd, still doesn't work. zzzzzzzzzz.PNG

Phil_Seamark
Employee
Employee

Hi @SachinC

 

Please try adding these two columns to your table.

 

MonthName = FORMAT({fieldname},"MMM YY")

MonthID = INT(FORMAT({fieldname},"YYYYMM")

The first column should be formatted the way you want, but I would use the Sort by column feature to have it sorted by the other column.  

 

If it were me, I'd be doing this in the Date/Calendar table 🙂

 

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

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