Invoking custom functions
Power Query offers you the ability to enrich existing tables with additional columns in many different ways, as you have seen in previous recipes, but it also allows you to use custom functions defined as expressions that take some variables as inputs to return a result value. In this recipe, we will see how to create a function, define function parameters, and invoke that function to generate an output.
Getting ready
For this recipe, you need to download the FactResellerSales
CSV file.
In this example, we will refer to the C:\Data
folder.
How to do it…
Once you open your Power BI Desktop application, you are ready to perform the following steps:
- Click on Get data and select the Text/CSV connector.
- Browse to your local folder where you downloaded the
FactResellerSales
CSV file and open it. The following window with a preview of the data will pop up; click on Transform Data: - Now, right...