1. Retrieving data from various sources into Power BI
Power BI can connect to data stored in different systems, formats, and locations, which creates a common starting point for transformation work. This part addresses importing data from various sources and preparing those connections for further processing in M.
2. Automation of the data preparation process for Power BI
Automating data preparation in Power BI reduces repetitive manual work and improves consistency across refreshes. The section focuses on structuring transformation steps so recurring cleansing, reshaping, and loading tasks can be executed reliably through reusable M logic.
3. Introduction to the M language
Power BI uses M as the query language for shaping and preparing data before modeling. Participants learn what the language is used for, how to create and edit simple queries, how code is structured, and how special characters and empty queries are handled.
- what the M language is and what it can be used for in Power BI,
- creating simple queries in the dedicated editor,
- how to make changes to M language code,
- the rules that should be followed in the M language,
- the properties of special characters and the structure of M language code,
- editing an empty query.
4. Values in the M language
M works with a wide range of values, from null and logical data to numbers, text, and binary content. Attention is also given to dates, times, durations, lists, and records, so participants can recognize how each value category behaves in transformations.
- null,
- logical values,
- numbers,
- times,
- dates,
- date/time,
- date/time/time zone,
- duration,
- text,
- binary values,
- list value,
- record value.
5. Types
Types in M provide the formal structure behind values and query behavior. The section explains the type hierarchy, primitive and abstract types, as well as record, list, function, and table types, including nullable variants used to model incomplete data.
- type hierarchy in the M language,
- primitive types (classification of primitive values and abstract types),
- record types,
- list types,
- function types,
- table types,
- nullable types.
6. Table functions in the M language
Transforming tabular data in M depends on a broad set of table functions rather than a single pattern. The material covers table construction, conversions, row and column operations, transformation logic, membership checks, table parameters, and sorting of data.
- constructing tables,
- conversions,
- information in tables,
- operations on rows,
- operations on columns,
- table parameters in the M language,
- transformations,
- membership checking parameters,
- sorting data in the M language.
7. Values of table parameters in the M language
Table parameters in M define how many table functions interpret structure and comparison rules. This section addresses naming output columns, equality and comparison criteria, numeric or conditional criteria, sort order, and handling extra values or missing columns.
- assigning names to output columns,
- comparison criterion,
- number or condition criterion,
- handling additional values,
- handling missing columns,
- setting the sort order,
- equality criterion.
8. Operators in the M language
Operators in M determine how values are compared, combined, and transformed during expression evaluation. Participants examine arithmetic, logical, and relational operations in context, with attention to how operator behavior influences filtering, calculations, and query outcomes.
9. Let expression
Building a query in M often starts with defining intermediate results and then returning a final expression. This part explains the let construct, its scope rules, and the way named steps improve readability, maintenance, and control over transformation logic.
10. Conditional instructions
Conditional instructions control how M responds to varying data and business rules. The section shows how branching logic is written and evaluated, so queries can return different results depending on conditions without duplicating transformation steps.
11. Error handling – evaluating an expression in the M language
When a query fails, the source of the problem is often hidden in evaluation rules rather than in the visible step. Here the focus is on error reporting, error-handling expressions, failures in records and let initializers, and the meaning of a not implemented error.
- error reporting procedure,
- expression used for error handling,
- possible errors in records and let initializers,
- not implemented error.
12. Sections
Working across multiple M documents involves both combining code and inspecting what each document exposes. The section covers document merging and the use of #sections and #shared for introspection, helping organize reusable logic and understand available definitions.
- merging documents,
- document introspection (#sections, #shared).
13. The value model of the M language and its application in Power BI data analysis
At the core of M lies a value model that determines how expressions are evaluated and how data structures behave. This part connects values, records, lists, and tables with their role in Power BI analysis, so transformations can be designed with predictable results.
14. Conversion of an existing data type
Changing an existing data type in M requires more than selecting a format in the interface. Participants work with explicit conversions, learn how type changes affect downstream steps, and see how to avoid mismatches when data is reused across Power BI queries.
15. Metadata
Metadata in M helps describe values, types, and transformations beyond the visible data itself. The section explains how metadata is attached and read, and how it can support clearer query logic, documentation, and controlled behavior in Power BI data preparation.