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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
elementaryraja
Regular Visitor

Download/Export all queries [SQL statements] from Power BI Desktop

I would like to analyse powerBI desktop report which has more than 50 queries [importing data from SQL server with complex SQL statements]. I was able to download all columns and measures with DAX studio and would like to export all sql queries instead of manually opening up through "Edit Queries".

 

Thanks

1 ACCEPTED SOLUTION

Hi @elementaryraja ,

Please follow the steps below.

1. Extract the pbix file and then find the Datamashup

2. Extract the DataMashup

3.Find the Formula folder and find the Section1 file and open it with Notepad.

 

Untitled.png

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
gbatize
Regular Visitor

Could you please provide an updated version of this answer? Thank you in advance.

Anonymous
Not applicable

One way:

1. Make a copy of the PBIX.

2. Change the extension to zip

3. open the DataMashup file with notepad.

4. search for: Query=

It will not be formatted nicely, though.

I renamed as zip file and opened it up with notepad, but still couldn't find query 

Hi @elementaryraja ,

Please follow the steps below.

1. Extract the pbix file and then find the Datamashup

2. Extract the DataMashup

3.Find the Formula folder and find the Section1 file and open it with Notepad.

 

Untitled.png

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-piga-msft ,
I followed your steps but in my case I don't see the folder 'DataMashup' unfortunately. Any thoughts please? Thanks. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.