Presentation is loading. Please wait.

Presentation is loading. Please wait.

Custom Functions in Power Query

Similar presentations


Presentation on theme: "Custom Functions in Power Query"— Presentation transcript:

1 Custom Functions in Power Query
By Yury Tokarev Perth Modern Excel & Power BI User Group

2 Agenda Build from scratch Connect to a range Retrieve data
Transform before appending Create a loop

3 What is a Function?

4 Vending machine

5 MAX(1,2)=2

6 Reference to Single Cell
Use function to get value from cell

7 Get Data from Range Single Cell Table

8 Dates as parameters

9 Inconsistent Data from Folder
Create Query from single file Transform – do not set data types Convert to Function Create Query from Folder Place function into new column as second step Expand records

10 Loop Table Names & Combine Data
Use recursive function Function arguments: Index, List of Tables, Resulting Table The function calls itself several times and combines resulting tables

11 Recursive Function Steps
Calculate number of tables in the list Return combined table if all iterations are done First iteration: Retrieve data from first table only + Increment Index Next iterations: retrieve data from other tables and combine + Increment Index

12 Q&A

13 Thank you!


Download ppt "Custom Functions in Power Query"

Similar presentations


Ads by Google