{"id":32433,"date":"2021-01-16T12:49:28","date_gmt":"2021-01-16T12:49:28","guid":{"rendered":"https:\/\/www.testpreptraining.com\/tutorial\/?page_id=32433"},"modified":"2021-01-16T12:49:28","modified_gmt":"2021-01-16T12:49:28","slug":"using-advanced-editor-to-modify-m-code","status":"publish","type":"page","link":"https:\/\/www.testpreptraining.ai\/tutorial\/using-advanced-editor-to-modify-m-code\/","title":{"rendered":"Using Advanced Editor to modify M code"},"content":{"rendered":"\n<p>You can use the advanced editor if you wish to see the code that Power Query Editor is creating with each step, or you want to create your own shaping code. Use the following steps to open the advanced editor &#8211;  <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Firstly, select the&nbsp;<strong>View<\/strong>&nbsp;tab on the ribbon, and then select&nbsp;<strong>Advanced Editor<\/strong>. <\/li><li>Then, a window appears, showing the existing query code. <\/li><li>Then, you can directly edit the code in the&nbsp;<strong>Advanced Editor<\/strong>&nbsp;window. <\/li><li>Lastly, to close the window, select the&nbsp;<strong>Done<\/strong>&nbsp;or&nbsp;<strong>Cancel<\/strong>&nbsp;button.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image is-style-default\"><figure class=\"aligncenter\"><a href=\"https:\/\/docs.microsoft.com\/en-us\/learn\/modules\/clean-data-power-bi\/media\/08-view-ribbon-advanced-button-ssm.png#lightbox\"><img decoding=\"async\" src=\"https:\/\/docs.microsoft.com\/en-us\/learn\/modules\/clean-data-power-bi\/media\/08-view-ribbon-advanced-button-ssm.png\" alt=\"View\u00a0ribbon, advanced editor button\"\/><\/a><figcaption>Source: Microsoft<\/figcaption><\/figure><\/div>\n\n\n\n<p>Whenever you shape data in Power Query, steps are created in the Power Query process.&nbsp;Moreover, these steps can be reordered, deleted, and modified where it makes sense.&nbsp;Each cleaning step that you made was likely created by using the graphical interface, but the Power Query uses the M language behind the scenes.&nbsp;Some of the features of M code are &#8211; <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Firstly, the combined steps are available to read by using the Power Query Advanced Editor. <\/li><li>The M language is always available to be read and modified directly.\u202f <\/li><li>It is not required that you use M code to take advantage of Power Query. <\/li><li>You will rarely need to write M code, but it can still prove useful. <\/li><li>Because each step in Power Query is written in M code, even if the UI created it for you, you can use those steps to learn M code and customize it to suit your needs.&nbsp;<\/li><li>After creating steps to clean data, select the&nbsp;<strong>View<\/strong>&nbsp;ribbon of Power Query and then select&nbsp;<strong>Advanced Editor<\/strong>.&nbsp;<\/li><\/ul>\n\n\n\n<p>Remember, each Power Query step will roughly align with one or two lines of M code. Indeed, you are not required to be an expert in M code to be able to read it. Moreover, you can even experiment by changing it. For instance, if you need to change the name of a database, you can do it right in the code and then select&nbsp;<strong>Done<\/strong>.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-image is-style-default\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.testpreptraining.ai\/analyzing-data-with-microsoft-power-bi-da-100-free-test\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"961\" height=\"150\" src=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2021\/01\/Microsoft-Exam-DA-100-Free-Practice-Test.png\" alt=\"Microsoft Exam DA-100 Free Practice Test\" class=\"wp-image-31483\" srcset=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2021\/01\/Microsoft-Exam-DA-100-Free-Practice-Test.png 961w, https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2021\/01\/Microsoft-Exam-DA-100-Free-Practice-Test-750x117.png 750w\" sizes=\"auto, (max-width: 961px) 100vw, 961px\" \/><\/a><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>You can use the advanced editor if you wish to see the code that Power Query Editor is creating with each step, or you want to create your own shaping code. Use the following steps to open the advanced editor &#8211; Firstly, select the&nbsp;View&nbsp;tab on the ribbon, and then select&nbsp;Advanced Editor. Then, a window appears,&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"categories":[174],"tags":[4030,3955,3954],"class_list":["post-32433","page","type-page","status-publish","hentry","category-microsoft-azure","tag-advanced-editor","tag-microsoft-exam-da-100-exam-questions","tag-microsoft-exam-da-100-free-practice-test"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Using Advanced Editor to modify M code - Testprep Training Tutorials<\/title>\n<meta name=\"description\" content=\"Boost your chances and get ready to qualify Microsoft Exam DA-100 with latest practice test. Learn about Advanced Editor Now!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.testpreptraining.ai\/tutorial\/using-advanced-editor-to-modify-m-code\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using Advanced Editor to modify M code - Testprep Training Tutorials\" \/>\n<meta property=\"og:description\" content=\"Boost your chances and get ready to qualify Microsoft Exam DA-100 with latest practice test. Learn about Advanced Editor Now!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.testpreptraining.ai\/tutorial\/using-advanced-editor-to-modify-m-code\/\" \/>\n<meta property=\"og:site_name\" content=\"Testprep Training Tutorials\" \/>\n<meta property=\"og:image\" content=\"https:\/\/docs.microsoft.com\/en-us\/learn\/modules\/clean-data-power-bi\/media\/08-view-ribbon-advanced-button-ssm.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/using-advanced-editor-to-modify-m-code\/\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/using-advanced-editor-to-modify-m-code\/\",\"name\":\"Using Advanced Editor to modify M code - Testprep Training Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\"},\"datePublished\":\"2021-01-16T12:49:28+00:00\",\"dateModified\":\"2021-01-16T12:49:28+00:00\",\"description\":\"Boost your chances and get ready to qualify Microsoft Exam DA-100 with latest practice test. Learn about Advanced Editor Now!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/using-advanced-editor-to-modify-m-code\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.testpreptraining.ai\/tutorial\/using-advanced-editor-to-modify-m-code\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/using-advanced-editor-to-modify-m-code\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using Advanced Editor to modify M code\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"name\":\"Testprep Training Tutorials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\",\"name\":\"Testprep Training\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"contentUrl\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"width\":583,\"height\":153,\"caption\":\"Testprep Training\"},\"image\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using Advanced Editor to modify M code - Testprep Training Tutorials","description":"Boost your chances and get ready to qualify Microsoft Exam DA-100 with latest practice test. Learn about Advanced Editor Now!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.testpreptraining.ai\/tutorial\/using-advanced-editor-to-modify-m-code\/","og_locale":"en_US","og_type":"article","og_title":"Using Advanced Editor to modify M code - Testprep Training Tutorials","og_description":"Boost your chances and get ready to qualify Microsoft Exam DA-100 with latest practice test. Learn about Advanced Editor Now!","og_url":"https:\/\/www.testpreptraining.ai\/tutorial\/using-advanced-editor-to-modify-m-code\/","og_site_name":"Testprep Training Tutorials","og_image":[{"url":"https:\/\/docs.microsoft.com\/en-us\/learn\/modules\/clean-data-power-bi\/media\/08-view-ribbon-advanced-button-ssm.png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/using-advanced-editor-to-modify-m-code\/","url":"https:\/\/www.testpreptraining.ai\/tutorial\/using-advanced-editor-to-modify-m-code\/","name":"Using Advanced Editor to modify M code - Testprep Training Tutorials","isPartOf":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website"},"datePublished":"2021-01-16T12:49:28+00:00","dateModified":"2021-01-16T12:49:28+00:00","description":"Boost your chances and get ready to qualify Microsoft Exam DA-100 with latest practice test. Learn about Advanced Editor Now!","breadcrumb":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/using-advanced-editor-to-modify-m-code\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.testpreptraining.ai\/tutorial\/using-advanced-editor-to-modify-m-code\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/using-advanced-editor-to-modify-m-code\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.testpreptraining.ai\/tutorial\/"},{"@type":"ListItem","position":2,"name":"Using Advanced Editor to modify M code"}]},{"@type":"WebSite","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","name":"Testprep Training Tutorials","description":"","publisher":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization","name":"Testprep Training","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","contentUrl":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","width":583,"height":153,"caption":"Testprep Training"},"image":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/32433","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/comments?post=32433"}],"version-history":[{"count":3,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/32433\/revisions"}],"predecessor-version":[{"id":32436,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/32433\/revisions\/32436"}],"wp:attachment":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/media?parent=32433"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/categories?post=32433"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/tags?post=32433"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}