March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi folks!
Just checking if any of you know a code formatter for M. I googled it but couln't find anything, so if you guys know one, please share in this post.
Thanks in advance,
Hi @Geradav this is great! I gave it a test out yesterday evening and one M query worked wonderfully, and the other didn't, but both run perfectly in Power Query with no syntax errors within PQ. Weird.🤔
I'll post the issues on Github once today's workload is done.
Cheers
Manfred
Hi Manfred,
yes, the PQFormatter is more or less in beta - still some functionality missing. Just send a bug report to github - we fix it, if we can 🙂
Holger
Reza Rad has a Beautify M Script function in his tool https://radacad.com/beautify-m-script-and-extract-row-level-security-with-power-bi-helper-version-4-...
Whilst it doesn't do a similar job to what the Dax Formatter (https://daxformatter.com ) does, and the newest updates to Power Query offer the Intellisense colour coding, this Power BI Helper tool does remove the extra tab paddings before lines, and offers the ability to get all your M code copied out in one place. Useful for archiving Queries.
There is also a way to get Notepad++ to have M language formatting https://community.powerbi.com/t5/Community-Blog/Get-your-own-Power-Query-Editor-using-Notepad/ba-p/1...
Bear in mind that if you like dark mode, you should set your custom setup to be compatible with this else it looks pretty messed up.
Cheers
Manfred
I don't know of any M formatter as such, but in the PowerBI preview features there is M intellisense
https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-september-2018-feature-summary/
which makes the code much more readable
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
7 | |
3 | |
2 | |
1 | |
1 |
User | Count |
---|---|
8 | |
3 | |
2 | |
2 | |
2 |