Forum Discussion
Working with Sharepoint List Data
priyaa is that O_Data showing when you expanded the column from the merged table, if yes, on your expand step there is an option called, use original name as prefix, uncheck that option.
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
Hello parry2k Thank you for taking time out to respond. No this is not coming while merging the data , the moment i import sharepoint list data i see this o_data being prefixed to all columns and also few of my column names are shportened.
- Icey6 years agoCommunity Support
Hi priyaa ,
Please try this:
I'll presume you have already brought in your SharePoint List into Power Query.
Create a new query called RealNames using the OData connector and the Odata query as I defined before. This will bring you a table with columns InternalName and Title (aka RealName). Transform this into a list or records, then the records into lists. The items in this final list become the name-value pairs for your rename operation.
let
Source = OData.Feed("https://xxx.sharepoint.com/sites/your site/_api/web/lists/GetByTitle('your list')/Fields?$select=Title,InternalName", null, [Implementation="2.0"]),
recs = Table.ToRecords(Source),
lsts = List.Transform(recs, each Record.ToList(_))
in
lstsThen back in your query where you brought in the SharePoint list, append this line:
= Table.RenameColumns(#"your previous step name", RealNames, MissingField.Ignore)
This will replace the names of any column whose internal name matches and ignore the others.
Reference: How to retrieve "correct" column names from SharePoint lists.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.