Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register 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
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |