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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
HemanthV
Helper II
Helper II

Concatenate cell value to Column Name

Hi Guys,

 

I have data like below

 

CountryCityPeriod

AaaP8
AbbP8
AccP8
AddP8
BeeP8
BffP8
BggP8
BhhP8
BiiP8
CjjP8
CkkP8

 

I want P8 value to be concatenated for "City" Column name so the column name will be "City (P8)". How to achieve this?

 

Attaching pbix for referrence

https://drive.google.com/file/d/1Fue2wfzz9GtOg6qTl9K-Nd1veLAuAif9/view?usp=sharing

 

Please help me on this!

Thanks in advance!

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

NewStep= Table.RenameColumns(PreviousStepName,{"City","City ("&PreviousStepName[Period]{0}&")"})

View solution in original post

6 REPLIES 6
wdx223_Daniel
Super User
Super User

NewStep= Table.RenameColumns(PreviousStepName,{"City","City ("&PreviousStepName[Period]{0}&")"})

@wdx223_Daniel ,

 

Now whenever the value changes column name changes, this is working fine but when i click on close and apply visual is getting error because column name got changed right. Is there any way to handle this situation?

Hi @wdx223_Daniel ,

 

Any help on this please?

sorry, have no idea to resolve this.

Okay, Thanks!

@wdx223_Daniel Thank you so much! It worked!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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 Kudoed Authors