cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors