Invoking custom M functions in Power Query (part 3)

  Рет қаралды 4,175

Exceed Learning

Exceed Learning

3 жыл бұрын

This video is the last part of the M functions video series.
After creating a custom function (as described in part 2), we want to use that function to process multiple tables of a similar structure in a single step.
How this can be done? You can find it in the video!
To learn more about Power Query, check out our new Power Query fundamentals course!
exceed.hr/en/academy/powerque...
#powerquery #powerbi #etltools #data #dataanalysis

Пікірлер: 11
@udayteja6595
@udayteja6595 Жыл бұрын
This playlist of three videos helped me a lot.
@user-gs2uf5gb6b
@user-gs2uf5gb6b Ай бұрын
Excellent tutorial, thank you
@udayteja6595
@udayteja6595 Жыл бұрын
Informative...
@naeemalsaleh9215
@naeemalsaleh9215 2 жыл бұрын
I have been trying to solve this for three days, and finally, I found your vide. thanx man :)
@SamehRSameh
@SamehRSameh 2 жыл бұрын
I hope to continue this tutorial
@nunolourenco1532
@nunolourenco1532 3 жыл бұрын
Very nice series! I have done this with the query from folder > combine & edit wizard feature but this way is cleaner, more powerful and you have even more control. I have to try to apply this to the last folder I'm using... THX!
@ExceedLearning
@ExceedLearning 3 жыл бұрын
Thank you Nuno! glad you enjoyed our video and found it useful!
@malchicken
@malchicken 3 жыл бұрын
Wonderful! Much appreciated :) A few questions this brings up for me: 1.) is there a function you could make that doesn’t take away the top two lines of the original script, so you put in the *file locations* as the variable rather than the table within that file. I think that’s what the power query ‘Get data > folder’ method does? 2.) could the new script which uses the FxClean function itself now be made into a function that could be applied to different folders with similar file structures within it, as the above examples? A custom function within a custom function type thing? 3.) Is there a way thru Power Automate to invoke these power query functions / actions. I’d like to automate these data cleanings being performed, so I’m just entering the data and the next morning all my data has been “power automate calling power query functions automated” into the structures I need, saved to the different locations I need, emails / teams message to the relevant people, auto marking itself off as a done task, etc. I guess it’s a question of how far with the task automation can one go?
@ExceedLearning
@ExceedLearning 3 жыл бұрын
Hi Hendrick, you can find the answers below: 1) Yes, this can be achieved by adding a text type of function parameter (something like (FolderLocation as text) => ), to make the folder path dynamic. Although this is possible, there is an option to use the Power Query parameter which is the better solution in case you want to make your folder path dynamic. 2) Excellent idea, and very much possible! You could use the FolderLocation as a text variable as shown in the answer above to create a function. Then, you would need to create a table with all folder paths that you want to process with function. After this step, you can invoke the function on the column that contains folder paths :) 3) You could use the Power Automate to save files in a folder, and on each refresh, the Power Query script will automatically process all the files in the folder (including the one you added with Power Automate).
@malchicken
@malchicken 3 жыл бұрын
@@ExceedLearning 1.) great, hmm, I’ll have to try that. The difference and advantage between calling a parameter vs just calling another query eludes me a bit but...I likely just need to play with functions more to get it. 2.) Wonderful! I’ll have to try this out as well. 3.) hmm, yes, makes sense. Next step, I’ll want to look into if there’s a way to auto-refresh my power query. Maybe that’s already an option I just need to find it ^^ . Thank you 🙏
@ExceedLearning
@ExceedLearning 3 жыл бұрын
@@malchicken in case you use Dataflows or PBI model in web service, then there is an easy to use auto-refresh feature. In case you are using Excel, then there is an option of scheduling autorefresh of a certain table created with PQ, but it only works in case your file is opened. VBA solution also works only in an open Excel. I believe currently the only option to invoke autorefresh of a closed Excel file is through a shell script.
Nested functions and Table.Buffer()
19:54
Exceed Learning
Рет қаралды 18 М.
List.Generate() Function and Looping in PowerQuery
23:56
Exceed Learning
Рет қаралды 24 М.
When You Get Ran Over By A Car...
00:15
Jojo Sim
Рет қаралды 18 МЛН
Пробую самое сладкое вещество во Вселенной
00:41
Write Your First CUSTOM M FUNCTION in Power BI
11:34
How to Power BI
Рет қаралды 28 М.
Using M to dynamically change column names in Power Query
18:46
Exceed Learning
Рет қаралды 13 М.
The IN Operator in Power Query
10:16
BI Gorilla
Рет қаралды 7 М.
each & underscore_  in Power Query Explained
9:58
Goodly
Рет қаралды 44 М.
10 awesome Power Query tricks you NEED to know! | Excel Off The Grid
15:44
Excel Off The Grid
Рет қаралды 30 М.
Invoke Custom Function in Power BI
12:06
Training2SQL MSBI
Рет қаралды 16 М.
When You Get Ran Over By A Car...
00:15
Jojo Sim
Рет қаралды 18 МЛН