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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Transposing issue

Hi

 

I have data in multiple sheets in multiple files and the data is arranged thus:

 

Sheets 1-50

col1            col2          

header1     1

header2     2

header3     3

 

...but when I power query it, the data ends up alongside each other rather than stacking...

 

I want it to transpose to look like:

 

header1     header2     header3

1                2                3

 

Nice and easy... but when I combine the tabs and transpose, the data ends up alongside each other:

 

header1     header2     header3     header1     header2     header3     header1     header2     header3

1                2                3                1                2                3                 1                2                3

 

What am I doing wrong?

 

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

You can create a custom function like this:

let
    Source = (tab as table, x) => Table.SelectRows(tab, each [col1] = x)[col2]{0}
in
    Source

Invoke this function in Table1 for Table2, Table3..., then you can transpose the table and use the first row as header

re.png

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

You can create a custom function like this:

let
    Source = (tab as table, x) => Table.SelectRows(tab, each [col1] = x)[col2]{0}
in
    Source

Invoke this function in Table1 for Table2, Table3..., then you can transpose the table and use the first row as header

re.png

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

You should add a column of null values, then place it at the first colun position, and then tranpose:

 

= Table.AddColumn(#"Name of Table or Last Step Name", "Nulls", each null)

 

Now your transpose will work, and you can then Promote Headers.

 

--Nate

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.