Filter by Categories
Select all
Budget
Business Statements
Calendars
Federal Income Tax
Gantt Chart
GST India
Health, Logs and Personal Trackers
Inventory
Investments
Invoice/ Bill
Maintenance
Payroll & HR
Project Reports & Timelines
Purchase Order/Requisition
Quotation
Rental Ledger
Risk Registers
Sales/ Marketing
SWOT Analysis
Timesheet/ Attendance
UAE VAT
UK VAT
Filter by File Types






What is Power Query Language (M Code) ?

What is Power Query Language i.e. M Code

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.

Content

Macro Codes in Excel

Learn Excel Quickly
Get full list of Excel Macro Codes