Forum Discussion
RyanS32229
8 years agoFrequent Visitor
Changing Month Number to Name - FORMAT not working
I'm trying to plot 2017 figures vs 2018's by month. This is working fine for Month Number on the X axis, using a calculated column simply as MONTH([Date]). However I really want to see mont...
- 8 years ago
Hi RyanS32229,
Two ways to extract month name from a date field:
MonthName = 'Table Name'[Date].[Month]
Alternatively
MonthName = FORMAT('Table Name'[Date],"MMM")Best regards,
Yuliana Gu
Floriankx
Solution Sage
8 years agoHello I think your formula works fine.
You should sort MonthName by MonthNumber:
Please give it a try and let us know.
Best regards
RyanS32229
8 years agoFrequent Visitor
See the 2nd pic, it's clearly not working.
Using the FORMAT is taking MONTH([Date]) as a Day Number rather than a Month Number, therefore it's formatting January i.e. (01) into 31st December 1899, February into 1st January 1900, March into 2nd January 1900 etc.
- shebr8 years ago
Resolver III
Hi RyanS32229
Can you perhaps share your data set? It could be that your dates are in the wrong format, or the setting in Power BI is set to a different date format also.
If you can send a link to your pbix I can have a look.
Thanks
shebr