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 September 15. Request your voucher.

Reply
Hamidrezaei
Frequent Visitor

Creating a new column with a cell value

Hi guys,

I want to create a column with a specific cell value which is located in the headline of the table, is there any way to do this? the picture below is an example of what I am trying to do.

I have tried this but it give me an error

= Table.AddColumn(#"Changed Type", "Custom", each {2}[Column3])

Untitled.png

Thank you for your help in advance

1 ACCEPTED SOLUTION
collinq
Super User
Super User

Hi Hamidrezaei,

There are a couple ways to do this.  The "easy" but brute force way is just to add a custom column to the table/query and enter the date.  Then, just trim out the rows you don't need.

 

ColumnA.png

 

ColumnB.png

 

 

A more "system" type approach would be to promote headers, making that date a column header, then unpivot that column.  Then, you would have to remove rows and promote headers and then rename the date to whatever the name is:

 

Initial Promoted HeadersInitial Promoted Headers

 

UnpivotUnpivot

 

 

Remove Rows, Promote Headers, Rename Date FieldRemove Rows, Promote Headers, Rename Date Field

 

 

 

 




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!
Private message me for consulting or training needs.




View solution in original post

3 REPLIES 3
collinq
Super User
Super User

Hi Hamidrezaei,

There are a couple ways to do this.  The "easy" but brute force way is just to add a custom column to the table/query and enter the date.  Then, just trim out the rows you don't need.

 

ColumnA.png

 

ColumnB.png

 

 

A more "system" type approach would be to promote headers, making that date a column header, then unpivot that column.  Then, you would have to remove rows and promote headers and then rename the date to whatever the name is:

 

Initial Promoted HeadersInitial Promoted Headers

 

UnpivotUnpivot

 

 

Remove Rows, Promote Headers, Rename Date FieldRemove Rows, Promote Headers, Rename Date Field

 

 

 

 




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!
Private message me for consulting or training needs.




Hi @collinq 

The problem with the unpivoting is that the date is changed every day , so the column name is not recognized the next day. Is there any other way to do this? 

 

 

Thank you @collinq 

The unpivot works!

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
Top Kudoed Authors