The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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