Forum Discussion
Concatenate cell value to Column Name
Hi Guys,
I have data like below
CountryCityPeriod
| A | aa | P8 |
| A | bb | P8 |
| A | cc | P8 |
| A | dd | P8 |
| B | ee | P8 |
| B | ff | P8 |
| B | gg | P8 |
| B | hh | P8 |
| B | ii | P8 |
| C | jj | P8 |
| C | kk | P8 |
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!
NewStep= Table.RenameColumns(PreviousStepName,{"City","City ("&PreviousStepName[Period]{0}&")"})
6 Replies
- wdx223_DanielCommunity Champion
NewStep= Table.RenameColumns(PreviousStepName,{"City","City ("&PreviousStepName[Period]{0}&")"})
- HemanthVHelper II
wdx223_Daniel Thank you so much! It worked!
- HemanthVHelper II
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?
- HemanthVHelper II