Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Power Query Text editor

Hello everybody, 

 

I have a data in which i merge about 40 different queries to get one evalutaion sheet of the data. For the documentation of the queries I would like to copy the M-Code of the queries and would like to save it in word file. 

Is there a possibilty to read out the code for all queries in one, or do I have to open the extended editor for each query and copy it to the word file. This would be very "labor intensity"

 

Thanks in advance for your help. 

 

1 ACCEPTED SOLUTION

@Anonymous , I was under impression that your queries are located in single file like in the picture below and you wanted to get all of their content in some text editor. 

q.jpg

 You may select many queries like files in Explorer - just select first in the list, press Shift key and select the last one or press Ctrl select some of them. I am a bit lost. You don't need to open Advanced Editor to copy a text of your query/queries. Select and copy it's name (or several names) on the left pane of PQ editor. Then paste it in word processor and see what happens.  

View solution in original post

4 REPLIES 4
AlienSx
Super User
Super User

Hello, @Anonymous select all query names/titles in editor, Ctrl-C and Ctrl-V in your word processing app. 

Anonymous
Not applicable

Hey AlienSx, thanks for your fast reply. But to be honest....How I can select more than one query in editor?

 

Carl1985_0-1680437825854.png

 

@Anonymous , I was under impression that your queries are located in single file like in the picture below and you wanted to get all of their content in some text editor. 

q.jpg

 You may select many queries like files in Explorer - just select first in the list, press Shift key and select the last one or press Ctrl select some of them. I am a bit lost. You don't need to open Advanced Editor to copy a text of your query/queries. Select and copy it's name (or several names) on the left pane of PQ editor. Then paste it in word processor and see what happens.  

Anonymous
Not applicable

Hey Alien Sx, thanks again for your help. That's what I already tried before your solution. To be honest I was a litte bit confused when I did it before, because I got a code like this. 

 

<?xml version="1.0" encoding="utf-8"?><Mashup xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/DataMashup"><Client>EXCEL</Client><Version>2.115.243.0</Version><MinVersion>2.21.0.0</MinVersion><Culture>de-DE</Culture><SafeCombine>false</SafeCombine><Items><Query Name="Schichtbericht - Rohdaten"><Formula><![CDATA[let Quelle =

 

After your reply I checked the code a little bit more in detail and it works fine. Sorry for my "stupidness". I just have to format the layout a little bit. 

 

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.