Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join 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.

Reply
Hannisky
Frequent Visitor

Help with creating function

I'm trying to create a function that makes changes to tables before expanding. The starting point is as below a column of tables. 

Hannisky_0-1646225236527.png

My function at present takes a table and promotes headers. 

 

Hannisky_1-1646225399659.png

 

It kind of works as intended but not getting the correct result 

 

Hannisky_2-1646225543016.png

Each table in column c2 has another table and the table contained does not have promoted headers. Not sure where my syntax is incorrect. 

Hannisky_3-1646225576093.png

 

Any help would be appreciated.

 

 

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @Hannisky ,

 

It looks like you should be invoking your function in a TransformColumns function, something like this:

 

Table.TransformColumns(Source, {"c1", each fnHeaders(_)})

 

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

2 REPLIES 2
BA_Pete
Super User
Super User

Hi @Hannisky ,

 

It looks like you should be invoking your function in a TransformColumns function, something like this:

 

Table.TransformColumns(Source, {"c1", each fnHeaders(_)})

 

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Perfect. Thank you

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.