The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi
I'm trying to convert Month numbers (1,2,3...12) in text (January, February,...).
I tried :
=FORMAT(MONTH([MyColumn]), "mmmm")
Anyway i could return some text?
Thanks!
Solved! Go to Solution.
Hi @Nicolas,
You can get the month name by using the DAX below.
MonthName = FORMAT(DATE(2016,Table1[MonthNumber],1),"MMMM")
OR
Month Name = SWITCH(Table1[MonthNumber],1,"January",2,"February",3,"March",4,"April",5,"May",6,"June",7,"July",8,"August",9,"September",10,"October",11,"November",12,"December")
Regards,
Hello,
I am getting only January when using Format(Month([ColumnName])),"MMMM")
Format(Month([ColumnName])),"MMMM") = January
Format(Month([ColumnName])),"MMM") = Jan
Format(Month([ColumnName])),"MM") = 01
Format(Month([ColumnName])),"M") = 1
Columns data is stored as datetime format
not sure what is caysing this problem?
@bhope I assume this is for a second column and not a measure? You don't need the MONTH function. FORMAT(TableName[ColumnName], "MMMM") will return the month. Make sure you're using TableName[ColumnName] not simply [ColumnName].
Proud to be a Super User!
I created Year, Month and Day column and used MonthName = format(date('Calendar'[Year],'Calendar'[Month],'Calendar'[Day]), "mmmm") for the MonthName column.
=FORMAT(MONTH([MyColumn]), "MMMM")
Capitalization counts. https://msdn.microsoft.com/en-us/library/ee634398.aspx
Proud to be a Super User!
Thanks but it now returns only January...
Is there not another way of doing the same thing?
Thanks!
I am facing the same error as well. I am only getting January. Could anyone help?
Hi @Nicolas,
You can get the month name by using the DAX below.
MonthName = FORMAT(DATE(2016,Table1[MonthNumber],1),"MMMM")
OR
Month Name = SWITCH(Table1[MonthNumber],1,"January",2,"February",3,"March",4,"April",5,"May",6,"June",7,"July",8,"August",9,"September",10,"October",11,"November",12,"December")
Regards,
Hi @v-caliao-msft,
is there in a difference in terms of performance, with direct query in place?
Thanks in advance.
regards
Alex
Oh yeah, the MONTH() argument shouldn't be there at all. FORMAT works on the entire date value.
FORMAT(TableName[Date], "MMMM")
Proud to be a Super User!
Try FORMAT(TableName[Date], "MMM") for the three letter month name as well.
Not sure where I did wrong , I am getting month number 01 as Dec instead of Jan
Please guide
same problem here.
Thanks to help!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
76 | |
65 | |
52 | |
51 |
User | Count |
---|---|
128 | |
117 | |
78 | |
65 | |
63 |