March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
When you load data from a SharePoint list, the columns are named using an "Internal" name rather than the "Display" name that exposed when interacting with SharePoint.
Is there a PowerQuery recipe that can be used to retrieve the display names and overwrite the internal names while importing into Power BI?
For example, when I retrieve a list from SharePoint, the names of the columns often do not match the column names displayed in SharePoint. For example:
"Primary Geography Country" is brought in as "Primary Geography Co"
"Launch: Overall Readiness" is brought in as "Launch: Overall_x002"
"Complete" gets brought is as "AllDone" (because I had originally called the column AllDone and then changed it)
"Introduction" gets brought in as "Title" (because I changed Title to Introduction)
I am hopeful that the display names are actually in the data, so I'm looking for a recipe to drill into the nested lists and records in what is returned for the list to get the display names. My hope is that these are stored consistently in the data structures, regardless of the type of data each column holds.
Dale
p.s. This is a repost of a question in a thread that took a wrong turn: https://community.powerbi.com/t5/Desktop/SharePoint-Lists-how-to-get-Display-names/m-p/483977#M22534...
Solved! Go to Solution.
I've now encapsulated this into a function. See the comments for usage example:
fnRealSpColumnNames
(sharePointSite, listName)=>
let
// After connecting to a SharePoint list, pass in the SharePoint site name and list name to this function inside a Table.RenameColumns call.
// The function returns the InternalName and DisplayName of each of the list column names.
// For example:
// = Table.RenameColumns(#"previous step name", fnRealSpColumnNames("https://xxx.sharepoint.com/teams/yoursite/", "Your ListName"), MissingField.Ignore)
Source = OData.Feed(sharePointSite & "/_api/web/lists/GetByTitle('" & listName & "')/Fields?$select=Title,InternalName", null, [Implementation="2.0"]),
recs = Table.ToRecords(Source),
lsts = List.Transform(recs, each Record.ToList(_))
in
lsts
@Anonymous I've been struggling with this for a while and your solution looks like a good one. Would it be possible for you to break down the steps required to apply this solution for someone who has very little experience with creating functions?
Many thanks in advance if you can!
Hello,
It is possbile to explain how to execute this function?
Thanks and br,
Hi Dale,
I have reported this issue to the Product Team. I will update here later.
Best Regards,
Dale
Hi Dale,
The report ID is CRI 79818387.
Best Regards,
Dale
Thanks very much Dale!
Is there a way for me to watch this CRI or get feedback if/when it is updated?
Dale
Hi Dale,
I will update the latest information here.
Best Regards,
Dale
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
143 | |
97 | |
79 | |
68 |