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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
priyaa
Regular Visitor

Working with Sharepoint List Data

Hello All, I am working with importing sharepoint list data in power BI. I am stuck with two issues:

1) Not all my column names are coming properly. For few of them the length is reduced by few letters.

2) Why do I see O_DATA prefix with all my column names? 

 

I have created another mapping sheet to merge the data and because of both these issues I am unable to complete my file. Please help.

5 REPLIES 5
Icey
Community Support
Community Support

Hi @priyaa ,

 

Is this problem solved?

 

 

Best Regards,

Icey

priyaa
Regular Visitor

No @Icey still struggling. Looks like in sharepoint column names were changed/ overwritten for new names but when pulling this backend list in Power BI is still fetching the old names so the mismatch. This is one of the reason i could see . for now i have creating a manual mapping but yeah need a solution for this and working towards understanding the logic 

parry2k
Super User
Super User

@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.

 

image.png

 

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!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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. 

Icey
Community Support
Community 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=Tit...", null, [Implementation="2.0"]),
recs = Table.ToRecords(Source),
lsts = List.Transform(recs, each Record.ToList(_))
in
lsts

 

Then 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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.