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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Alice08
Helper III
Helper III

How to add columns name as a row in new column?

I wan to show some column names as a row in new column.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Alice08 ,

I created some data:

Table:

vyangliumsft_0-1675931410636.png

 

Here are the steps you can follow:

1. Create calculated column.

You can use NAMEOF() functions to get table and column names:

NAMEOF('Table'[A])

vyangliumsft_1-1675931410638.png

 

You can use the Mid() function to intercept:

Column =
MID(
    NAMEOF('Table'[A]),9,1) &""& MID( NAMEOF('Table'[B]),9,1)

2. Result:

vyangliumsft_2-1675931410638.png

 

Best Regards,

Liu Yang

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
Anonymous
Not applicable

Hi  @Alice08 ,

I created some data:

Table:

vyangliumsft_0-1675931410636.png

 

Here are the steps you can follow:

1. Create calculated column.

You can use NAMEOF() functions to get table and column names:

NAMEOF('Table'[A])

vyangliumsft_1-1675931410638.png

 

You can use the Mid() function to intercept:

Column =
MID(
    NAMEOF('Table'[A]),9,1) &""& MID( NAMEOF('Table'[B]),9,1)

2. Result:

vyangliumsft_2-1675931410638.png

 

Best Regards,

Liu Yang

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

wdx223_Daniel
Super User
Super User

NewStep=Table.Unpivot(PreviousStepName,{"ColumnName"},"ColumnName","Value")

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.