Export the Entire M Power Query Script from a Power BI File, New Version of Power BI Helper, Search based on Field Description in the Model

Previous versions of Power BI Helper had some features related to the visualization part and the modelling part of a Power BI file. This latest release of Power BI helper, can export the entire M or Power Query script into a file or into clipboard. Sometimes, especially when the number of queries in the Power BI is too many, maintaining the code behind of it can be useful. Not only for the documentation, but also this helps to learn more about what is happening in the ETL side of your solution.

Export M Script

You have to download the latest version of Power BI Helper (Version 1.0). If you have other versions (0.1, 0.2, or 0.3) installed previously, un-install those before this action. After installing the new version, you will see a tab for M Script.

Download Power BI Helper (FREE)

 

Select a *.pbix file in Configure tab

Then Go to M Script tab, and click on extract M Script. This step requires installation of 7-zip free tool. You can download 7-zip for free from here: http://7-zip.org

This simply extract the entire M script into the text box here. The M script includes all queries, functions, parameters, and any other Power Query objects.

This process, also does a very minor analysis on how many parameters, queries, and functions you have in your code, and put that into another text box right beside it. All parameters will be listed in one section, then functions, and then queries.

You can now export the entire M Script either into a file (with extension of *.m), or copy that into a clipboard.

This feature at the moment doesn’t apply much of analysis in the code, but wait for next few versions, we are going to add a lot of features related to M analysis here later on.

Search based on Field Description or Properties in the Model

One of the new features added in the Power BI Desktop in December 2017 is to add description (or properties to fields in the model);

In RADACAD, we’d thought it will be useful to be able to search fields in the model based on this properties. And now in the new version of Power BI Desktop, you can search based on either field/table/measure name or properties of that.

Power BI Helper on a Virtual Machine

Previous versions of Power BI Helper didn’t work on a virtual machine. You could actually install it, and use the visualization analysis features of it, but the Model analysis didn’t worked on a VM. With great help on the feedback, and test from Gilbert Quevauvilliers (B|T), we managed to fix that issue. Now Power BI Helper works perfectly on the Virtual Machines as well.

More Features?

Let us know if you are looking for some other features in the comment area. We are continuously adding new features to make this tool a free good companion for Power BI Desktop to help developers all around the world.

Reza Rad on FacebookReza Rad on LinkedinReza Rad on TwitterReza Rad on Youtube
Reza Rad
Trainer, Consultant, Mentor
Reza Rad is a Microsoft Regional Director, an Author, Trainer, Speaker and Consultant. He has a BSc in Computer engineering; he has more than 20 years’ experience in data analysis, BI, databases, programming, and development mostly on Microsoft technologies. He is a Microsoft Data Platform MVP for 12 continuous years (from 2011 till now) for his dedication in Microsoft BI. Reza is an active blogger and co-founder of RADACAD. Reza is also co-founder and co-organizer of Difinity conference in New Zealand, Power BI Summit, and Data Insight Summit.
Reza is author of more than 14 books on Microsoft Business Intelligence, most of these books are published under Power BI category. Among these are books such as Power BI DAX Simplified, Pro Power BI Architecture, Power BI from Rookie to Rock Star, Power Query books series, Row-Level Security in Power BI and etc.
He is an International Speaker in Microsoft Ignite, Microsoft Business Applications Summit, Data Insight Summit, PASS Summit, SQL Saturday and SQL user groups. And He is a Microsoft Certified Trainer.
Reza’s passion is to help you find the best data solution, he is Data enthusiast.
His articles on different aspects of technologies, especially on MS BI, can be found on his blog: https://radacad.com/blog.

Leave a Reply