Screenshot tutorial: Add a column with custom function code in Power Query

The following steps show how to create a new column in a table using existing custom function code. This works in Power BI as well as in Power Query in Excel:

1. Copy the function code

1: Copy the function code

 

2. Create new blank query in the query editor

2: Create new query

3. Open the advanced editor

3: Open the advanced editor

4. Replace existing function code by new one

4: Paste new function code

5. Rename query (optional)

5: Rename query (optional)

6. Invoke custom function

6: Add a new column with “Invoke Custom Function” command

7. Edit function parameters

7: Edit function parameters

Enjoy & stay queryious 😉

Comments (2) Write a comment

  1. Pingback: Adding A Column With Custom Function Code In Power Query – Curated SQL

  2. Pingback: Bulk-extract Power Query M-code from multiple Excel files at once – The BIccountant

Leave a Reply