Conceptualizing M
As with any programming language, it is important to understand both the abstract principles of the language as well as more practical topics, such as what functions are available and how to use them. This chapter aims to provide you with a solid conceptual understanding of key, perhaps more abstract aspects of Power Query M, such as scope, the global environment, closure, and metadata. These concepts are crucial to truly becoming a master of Power Query M.
We will begin by delving into the concept of scope in Power Query M. Understanding scope is essential for controlling the visibility and accessibility of variables and functions within your queries. We will explore the distinction between local and global scope, examining how variables and functions interact within different scopes to produce effective data transformations.
Any discussion of scope naturally leads to a discussion of the global environment for Power Query M and how we can create our own...