Forum Discussion

elementaryraja's avatar
elementaryraja
Regular Visitor
7 years ago
Solved

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

  • v-piga-msft's avatar
    v-piga-msft
    7 years ago

    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.

     

    Best Regards,

    Cherry

5 Replies

  • Anonymous's avatar
    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.

    • elementaryraja's avatar
      elementaryraja
      Regular Visitor

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

      • v-piga-msft's avatar
        v-piga-msft
        Icon for Resident Rockstar rankResident Rockstar

        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.

         

        Best Regards,

        Cherry

  • Anonymous's avatar
    Anonymous
    Not applicable

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