Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I'm trying to create a query that has a step that processes a column that contains a table th adds a custom column that uses a custom function to transform the contents of the table calue of the column.
I'm using the custom function since the transformation code is quite complex.
My issue is how to 2 part:
Ideas much appreciated
Solved! Go to Solution.
Hi , @Anonymous
According to your descripition, you want to create a custonm function in Power Query Editor.
And you want to pass a "record" type parameter in your custom function, and you want to use your table row as this parameter when we call the custom function.
Here are the steps you can refer to :
(1)We can create a customn column with the "record" type parameter like this:
= (re as record) as table=>let rec=Table.FromRecords({re}) in rec
(2)We can call this api in another table each row.
We can click "Custom Column" in "Add Column" pane and enter this:
And we can modify the M code like this then we can put this row record to our custom function.
= Table.AddColumn(#"Changed Type", "Custom", each Query1(_) )
We can also use this M code , this is the same :
= Table.AddColumn(#"Changed Type", "Custom", (x)=> Query1(x) )
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi , @Anonymous
According to your descripition, you want to create a custonm function in Power Query Editor.
And you want to pass a "record" type parameter in your custom function, and you want to use your table row as this parameter when we call the custom function.
Here are the steps you can refer to :
(1)We can create a customn column with the "record" type parameter like this:
= (re as record) as table=>let rec=Table.FromRecords({re}) in rec
(2)We can call this api in another table each row.
We can click "Custom Column" in "Add Column" pane and enter this:
And we can modify the M code like this then we can put this row record to our custom function.
= Table.AddColumn(#"Changed Type", "Custom", each Query1(_) )
We can also use this M code , this is the same :
= Table.AddColumn(#"Changed Type", "Custom", (x)=> Query1(x) )
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
71 | |
55 | |
37 | |
31 |
User | Count |
---|---|
89 | |
62 | |
61 | |
49 | |
45 |