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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
SR_dataguy
New Member

I want to Transpose each sheet and then append all in a single query

Hi,

 

I have an excel workbook with many sheets, aroung 30-35 sheets. All sheets have same formatted data and with same column headers. Only 1st column header has sheet name in each sheet. (Example data screenshot below)

SR_dataguy_0-1682595483260.png

 

In Power BI Power query, I'll import folder and load file over in power query. Layter I want to transpose each sheet individually and then append one below other with sheet name as 1 column so that we can filter data later. (below image is to show how it should transpose)

SR_dataguy_1-1682595698891.png

 

We can do each query for each sheet and then append but I want all this to be done automatically if any other sheet added/deleted/modified. So I want it to be done all in single query.

 

How to do this? Please help me here. 

 

Many thanks in advance. Cheers.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

So if you have the query named "Example" that correctly transforms one sheet, add this before the first "let"

 

(ColumnName as table) =>

This will turn your query into a function. Then go to your list of tables (the Excel sheets) and under add columns, choose "Invoke Custom Function". Use "Example" query as your function, and Content (it could be Data) as your parameter.

 

--Nate

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

So if you have the query named "Example" that correctly transforms one sheet, add this before the first "let"

 

(ColumnName as table) =>

This will turn your query into a function. Then go to your list of tables (the Excel sheets) and under add columns, choose "Invoke Custom Function". Use "Example" query as your function, and Content (it could be Data) as your parameter.

 

--Nate

Great man, thanks a ton. It worked. You saved a lots of time.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors