Forum Discussion
Cleaning up column headers
Hi All,
I am cleaning up column headers I have the following on a merged query:
Some of the columns from the original tables are slightly different
I am cleaning up the 'questions' and I am using the following code:
#"Renamed Columns" = Table.RenameColumns(#"Added Custom",Table.ToRows(#"Course Fields"))
| Survey Question Status | Survey Question Status |
| Survey Questions Status | Survey Question Status |
I am getting the following error:
Expression.Error: The field 'Survey Question Status' already exists in the record.
Details:
Name=Survey Question Status
Value=
Anyone know how to amend the code to enable it to handle the duplicates and merge them to the correct name?
1 Reply
- v-cherch-msftMicrosoft Employee
Hi Anonymous
I'm afraid i cannot fully understand it.Could you share some data sample and expected output?Find some articles for you to check if they could help.
https://prathy.com/2017/03/modify-column-names-using-m-functions/
https://dataveld.com/2015/08/08/step-by-step-using-power-query-to-replace-text-in-table-headers/
For 3rd party Links:
Please understand that this link is provided “AS IS” with no warranties or guarantees of content changes, and confers no rights.
Regards,