Extending the Core M Library
The core M library comes with hundreds of different functions to aid in data connectivity, data cleansing, and data transformation. However, one of the strengths of the M language is its ability to be easily extended with custom functions.
In this recipe, we add a simple custom function as an extension of the core M library of functions.
Getting ready
To prepare for this recipe, we first need to identify and/or create a Custom Connections
folder for Power BI Desktop. Look in your Documents
directory for the current user. If the folder Microsoft Power BI Desktop
does not exist, create it. Navigate to the Microsoft Power BI Desktop
folder, and if the folder Custom Connectors
does not exist, create it.
How to extend the core M library
To implement this recipe, follow these steps:
- Create the following text file and save the file as
Cookbook3.pq
in the[Documents]\Microsoft Power BI Desktop\Custom Connectors
folder./...