Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Can Power Quary create a Script ?

Hi All

 

Adv of DAX is i can keep all script for record the field.

Power Quary Adv is very easy to recode field but it is unable to create a script.

 

Paul Yeo 

4 Replies

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    Not sure what you mean by script but you can view the M code behind your query by hitting the Advanced Editor button in the ribbon.  Much more is possible with M than just what is in the ribbon.

     

    Regards,

    Pat

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi mahoney

      Thank you very much , i just check and i know what you mean.

       

      • PhilipTreacy's avatar
        PhilipTreacy
        Super User

        Hi Anonymous 

        If what you are referring to is the ability to create a 'script' that can be reused then yes, PQ does this.  It's just that the M code is 'hidden' unless you open the Advanced Editor.

        If you use the GUI to create your transformation steps then the M code is created by PQ in the background.

        This 'script' can then be shared in several ways including as an Excel workbook (if using PQ in Excel), a PBIX file (if using PQ in Power BI) or just as a text file (copy/paste the code).

        Phil


        If I answered your question please mark my post as the solution.
        If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.