Using the Advanced Editor
While most novices will rely heavily on the GUI and Power Query Editor to write all or the majority of their M code, advanced users will eventually migrate to wanting direct access to the M code, similar to how the source code is created and edited in most other programming languages. Luckily, Power Query Editor provides such an interface, the Advanced Editor. To access the Advanced Editor, click on the Home tab of the ribbon and then select Advanced Editor from the Query section as shown in Figure 2.18:
This launches the Advanced Editor dialog as shown in Figure 2.19:
In Figure 2.19 the entire M code that comprises the Chapter 2, Product Inventory query is displayed. All the steps of the query are contained within the let expression introduced in Chapter 1, M Language Basics. In addition, the Display Options dropdown has been used to Display line numbers and Enable word wrap. Clicking...