Beautify M Script and Extract Row Level Security with Power BI Helper Version 4.0

Posted by on Aug 27, 2018 in Power BI Helper, Power Query | No Comments

Power BI Helper is getting new features every time, and this time, we got some exciting features; You can now get your M (Power Query script) code beautified and colorful with version 4.0 of Power BI Helper. We also get the row-level security information exposed through the Helper application. Both information above will be now available when you export the model information to a document. If you like to learn more about Power BI Helper, read this page.

If you are new to Power BI Helper, read below posts to learn what are existing features of this product:


To Download Power BI Helper, click here:

Download Power BI Helper from here.

Beautified M Script

We are very excited to let you know that your M script is not documented all black text, you get a beautiful color coding with that now. Here is a sample output of Power BI Helper for M script;

As you can see the color coding above shows comments in greet, reserved words as blue, and function names as purple. You can get this output after three steps in Power BI Helper, Open Power BI Helper (we’ve got a new icon now 😉 )

First Select your *.Pbix file in the Config tab.

Then in the second step, you can extract the M code in a text box. Note that the text box here shows only the content in text format. the colored output comes in the next step;

In the last step, you can click on Beautify M Script;

This action will open the Beautified M Script tab with an output of color-coded beautified M script code;

You can also see the output in an exported document;

The HTML export documented output of Power BI Helper, will have the beautified M script at the end of it

Reading the M script of Power Query, or exporting it in a readable format, been always a challenge. Power BI Helper is making this process simpler and faster for you 🙂

Row-Level Security

Another important information in a Power BI solution is row-level security implementation. The new version of Power BI Helper will reveal this information for you in the Analytics tab. You will have all the information now in there. You can also export the information into a document.

Here is an example row-level security implementation in Power BI file;

In the new version of Power BI Helper, the Analytics tab has a section for roles and tables involved in each role, plus the expression for every table;

You can also get this information exported into HTML output format as below;


Power BI Helper version has great feature of M script beautifier and also the row-level security information revealed. both this information can be exported into Power BI documented output. Power BI helper is evolving every month. This is a free tool, and will remain a free tool to help the Power BI community. Please help us with your feedbacks and suggestions about features you would love to see in next versions 🙂

Reza Rad
Reza Rad is an Author, Trainer, Speaker and DW/BI Consultant. He has a BSc in Computer engineering; he has more than 15 years’ experience in databases, programming and development mostly on Microsoft technologies. He is a Microsoft MVP in Data Platform for seven continues years (from 2011 till now) for his dedication in Microsoft BI. He is author of some SQL Server and BI books, and also Power BI online book; from Rookie to Rock Star.

Leave a Reply

Your email address will not be published. Required fields are marked *