Introduction to Power Query
Power Query is a data transforming engine which you can use to get data from multiple sources, clean and transform that data and then use it further in the analysis.
What is M Code ?
M Code is also known as Power Query Language. For every step you perform in power query it generates a code (at the backend) which is called M Code. On the Home tab, there is a button called “Advanced Editor” which you can use to see the code.
And when you click on the advanced editor it will show you the code editor and that code looks something like below:
M is a case sensitive language and like all the other languages it uses variables and expressions. The basic structure of code looks like below where the code starts with the LET expression.
In this code, we have two variables and the values defined to them. In the end, to get the value, IN expression has been used. Now when you click OK it will return the value assigned to the variable “Variablename” in the result.
Other Resources to Learn
Check out this resource to learn more about Power Query Language.