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
jeongkim
Post Prodigy
Post Prodigy

Use particular row as header

Hi,

 

Can we use rows which has particular value as Header? instead of first row?

As I combined multiple files so if I use first row, then only 1 row from 1 file has header and rest of files have no header. 

 

e.g. hope to have 'id' will be header in matrix/table visual

 

Query

jeongkim_0-1712815578323.png

 

Visual

jeongkim_2-1712815730468.png

 

Of course I can manually change the column name as 'id' and filter not to select 'id' values but the thing is I have 100 columns for other data so it would be really hard to change all the column names. 

And sometimes the column order changes so I try to avoid to fix column name by order. 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @jeongkim ,

If you are making a change to a row I think you can do it in Power Query by first deleting all the rows above the row you want to use as a title. If there is only the desired row at the top, use the "Use first row as Headers " option to elevate that row to a title.

vyilongmsft_0-1712899455022.png

In case of multiple columns, I think you can use M-code, the following M-code will hopefully help you.

let
    Source = Excel.CurrentWorkbook(){[Name="YourTableName"]}[Content],
    PromoteHeaders = Table.PromoteHeaders(
        Table.Skip(Source, 
            List.PositionOf(
                List.Transform(Source[Column1], Text.Upper), 
                "ID"
            )
        )
    )
in
    PromoteHeaders

 

 

 

Best Regards

Yilong Zhou

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

1 REPLY 1
Anonymous
Not applicable

Hi @jeongkim ,

If you are making a change to a row I think you can do it in Power Query by first deleting all the rows above the row you want to use as a title. If there is only the desired row at the top, use the "Use first row as Headers " option to elevate that row to a title.

vyilongmsft_0-1712899455022.png

In case of multiple columns, I think you can use M-code, the following M-code will hopefully help you.

let
    Source = Excel.CurrentWorkbook(){[Name="YourTableName"]}[Content],
    PromoteHeaders = Table.PromoteHeaders(
        Table.Skip(Source, 
            List.PositionOf(
                List.Transform(Source[Column1], Text.Upper), 
                "ID"
            )
        )
    )
in
    PromoteHeaders

 

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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