Power Query M Language Training

£890.00

This Power Query M Language Training Course is a comprehensive, hands-on training course designed for data professionals who want to unlock the full potential of Power Query and the M language. Dive deep into advanced techniques for data transformation, custom function creation, error handling, and working with lists, tables, and text. Learn to connect and transform data from diverse sources, including text files and Excel, while mastering dynamic solutions like custom date tables and iterative logic. By the end of this course, you’ll be equipped to tackle complex data challenges with confidence, streamline workflows, and enhance your Power BI projects with advanced M capabilities.

Clear
SKU: GCOM-PQMPU-103 Category:

Description

This Power Query M Language Training Course is a comprehensive, hands-on training course designed for data professionals who want to unlock the full potential of Power Query and the M language. Dive deep into advanced techniques for data transformation, custom function creation, error handling, and working with lists, tables, and text. Learn to connect and transform data from diverse sources, including text files and Excel, while mastering dynamic solutions like custom date tables and iterative logic. By the end of this course, you’ll be equipped to tackle complex data challenges with confidence, streamline workflows, and enhance your Power BI projects with advanced M capabilities.

Learning Objectives

By the end of this course, participants will be able to:

  • Understand the M language structure, including the let ... in statement, variables, and comments, to write and debug custom scripts in Power Query.
  • Identify and apply appropriate M data types, including special and complex types, and perform effective type conversions for accurate data transformations.
  • Connect to and transform data from various sources, including text files and Excel, using advanced Power Query techniques like File.Contents, Csv.Document, and Excel.Workbook.
  • Create and utilize custom functions in Power Query to automate repetitive tasks and enhance efficiency in data preparation workflows.
  • Work with lists and iterative logic to perform complex data transformations, such as combining data from multiple files or maintaining dynamic file lists.
  • Master table functions like Table.SelectColumns and Table.RemoveColumns to manipulate and reshape datasets effectively.
  • Use text functions for string manipulation, including case standardization, whitespace handling, splitting, joining, and advanced string analysis.
  • Leverage date and time functions to build custom date tables, calculate elapsed times, and dynamically extract year, month, and day information from date fields.
  • Implement robust error handling and debugging techniques to manage structural errors, incomplete edits, and replace or catch errors during transformations.

Participants will leave with advanced skills to optimize Power Query workflows, tackle complex data challenges, and integrate M language solutions into their Power BI projects confidently.


Course Outline

Getting Started

Why Learn M?
When the Interface Falls Short
Working with M in the Query Editor
Using Visual Studio

M Language Basics

The nature of the M language
The let … in statement block
Comments in M
Variables in M

M Data Types

Overview of M Data Types
Special Data Types
Type Conversion in M
Practical Examples of Using Data Types
Summary of M Data Types

Connecting to Text Files

File.Contents: Connecting to the File Itself
Using Csv.Document with File.Contents
Handling Different Delimiters
Handling Different Encodings
Importing and Transforming a Text File
Summary

Connecting to Excel Data

Overview of Excel Objects in Power Query
Using Excel.Workbook to Connect to Excel Data
Navigating the Metadata
Handling Worksheets
Handling Named Ranges
Full Example: Extracting and Transforming Data
Key Takeaways
Table.Combine vs Append Queries

Custom Functions

Structure of an M language function
Key Characteristics of M Functions
Example: Anatomy of a Custom Function
When to Use Custom Functions
Creating a Custom Function
Using the Function to Generate a Query
Making the Function Accessible to Less Experienced Users
Writing a Function to Be Called Within a Power Query Script

Lists and Iterative Logic

List Essentials
Basic List Functions
Practical Applications of Lists
Iterative Logic with List Functions in Power Query
Practical Example: Combining Data by Maintaining a File List

Table Functions

Why Table Functions Are Important
Overview of Table Functions
Table.Select Columns and Table.RemoveColumns
Table.Select Columns: The Constructive Approach
Table.RemoveColumns: The Reductive Approach

Text Functions

Why Text Functions Are Important
Categories of Text Functions
Example: Standardizing Case Formats
Whitespace Handling
Splitting and Joining
Analyzing Strings
Splitter Functions and Replacer Functions
Partner Functions for Splitter and Replacer Functions

Date and Time Functions

Date and Time Data Types in Power Query
Overview of Date and Time Functions
Example: Extracting Year, Month, and Day
Importing a Date-Stamped File Using a Dynamic Filepath
Dynamic Column with Elapsed Time
Testing the Functions
Key Concepts Explained
Creating a Custom Date Table in Power Query

Error Handling and Debugging

How Errors Impact Queries
Two Types of Error Outcomes
Rules for Error Handling in Power Query
Best Practices for Avoiding Structural Errors
Categories of Errors in Power Query
Errors Caused by Incomplete Editing
Best Practices for Avoiding Incomplete Editing Errors
Raising, Catching, and Replacing Errors
Conclusion

Additional information

Date

13-14 February 2025 (Tutor-led, Online), 17-18 April 2025 (Tutor-led, Online), 12-13 June 2025 (Tutor-led, Online), 7-8 August 2025 (Tutor-led, Online), 9-10 October 2025 (Tutor-led, Online), 13-14 November 2025 (Tutor-led, Online)