Understanding the M language
M, also known as the Power Query formula language, is an integral part of Power BI and Power Query. It facilitates the transformation of raw, unstructured, or messy data into organized, refined datasets that are ready for analysis and visualization. Unlike traditional formulas in Excel that operate on cell-level data, M operates on entire columns or tables, enabling complex data transformations across large datasets.
M and DAX are two coding languages within Power BI; however, M is also very different from DAX. It’s a functional, case-sensitive language (similar to F# for those familiar) that employs a sequence of steps to transform data. In Power Query’s M language, each step in the query editor represents a transformation or operation applied to the data. While not explicitly defined as functions, these steps function in a manner similar to functional programming. The steps operate sequentially, with the output of one step serving as...