Hi! Today I'm going to show you how to call a power query custom function from file in edit queries. You can now create a repository of custom functions and reuse them from there. Maybe in the near future we can have our m code more organized in our organization. This post will help us get throw this step by step.
First of all we are going to open a notepad and paste our function like the following example format:
TextAsNumber = (valor as number) =>
Mostra = "The number is: " & Text.From(valor)
Save file as a ".pq" file to your repository. In this case I'm going to use my github.
Note: pq extension is just if you want to work with it using power query sdk in visual studio.
Then on Power Bi Desktop Edit Queries just get data from Blank Query and paste the code below replacing the string with raw path from your github, repo or local path (in this last case you should change the word Web to File for contests).