In the 2.104.941.0 64-bit (april 2022) version of Power Query, the Format Code "M" returns first day of month and month name;
Date.ToText(#date(2010, 12, 31), "M", "en-US")
Which is not the expected value 12. A workaround is of course simple; using
However, it's still a bug.
Please try the recent version of Power BI Desktop.
Latest version of PBI Desktop: Downloads | Microsoft Power BI
Older version of PBI Desktop: Previous monthly updates to Power BI Desktop and the Power BI service - Power BI | Microsoft Docs
As you can see, if test in 2.105.1143.0 64-bit (May 2022), it works well.
Community Support Team _ Caiyun
Sorry, I see that I had lost a digit, however, the issue is still present in latest version of Power BI; 2.106.883.0 64-bit (june 2022).
According to the documentation,
should return 12 (as a text string).
However, as you point out, @v-cazheng-msft , it returns
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.