The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
We are working in a multicultural company.
Some of our semantic models use as sources Sharepoint lists. When checking in the sources, we set `ViewMode="All"` where metadata columns are also pulled. Except sometimes they are pulled in GErman, sometimes in English, and sometimes in French.
Unfortunately, transforming these columns is done based on the name, e.g. https://learn.microsoft.com/en-us/powerquery-m/table-removecolumns (this is only an example).
The consequence is that:
Question:
One example: "Expression.Error: The column 'Color Tag' of the table wasn't found.. Color Tag. . The exception was raised by the IDbCommand interface. Table: <tablename>" ==> The transformation expects "Farbenkennzeichnung" in the cloud version. (I have replaced the real name by <tablename>)
Thank you in advance for your help.
Solved! Go to Solution.
Normally, the solution could have been to use ApiVersion 15 as mentionned in the doc:
ApiVersion: A number (14 or 15) or the text "Auto" that specifies the SharePoint API version to use for this site. When not specified, API version 14 is used. When Auto is specified, the server version will be automatically discovered if possible, otherwise version defaults to 14. Non-English SharePoint sites require at least version 15.
Excep passing `ApiVersion` doesn't work 🙂 : `Expression.Error: The following are not valid SharePoint list 2.0 options: ApiVersion.`
OK, so the only solution is to do a remapping as mentionned by @andrewsommer
This is highly unsatisfactory as if someone with a new locale works on the same report, it will not work until his/her language is added in the remapping and, much much worse, if someone (even a standard user) wants to change the name of a Sharepoint List column in his/her own locale, then it will break it all. I can't believe Microsoft did such a bad API using labels instead of unique names! Is there an area where we can tell Microsoft this must be changed?
Here an example of a working remapping:
let
Source = ..., // your source table
// Mapping from both German and English to German (display names)
RenameMap = {
{"Color Tag", "Farbkennzeichnung"},
{"ID", "ID"},
{"Content Type", "Inhaltstyp"},
{"Version", "Version"},
{"Attachments", "Anlagen"},
{"Edit", "Bearbeiten"},
{"Type", "Typ"},
{"Item Child Count", "Untergeordnete Elementanzahl"},
{"Folder Child Count", "Untergeordnete Ordneranzahl"},
{"Label setting", "Bezeichnungseinstellung"},
{"Retention label", "Aufbewahrungsbezeichnung"},
{"Retention label Applied", "Aufbewahrungsbezeichnung angewendet."},
{"Label applied by", "Bezeichnung angewendet von"},
{"Item is a Record", "Element ist eine Aufzeichnung"},
{"App Created By", "App erstellt von"},
{"App Modified By", "App geändert von"}
},
ExistingCols = Table.ColumnNames(Source),
FilteredRenameMap = List.Select(RenameMap, each List.Contains(ExistingCols, _{0})),
Renamed = Table.RenameColumns(Source, FilteredRenameMap)
in
Renamed
Thanks for your response.
There is no way to access a column using a UUID instead of a name?
Unfortunately, SharePoint does not provide a built-in parameter in SharePoint.Tables or Power Query (M) to enforce a specific language for metadata column names. The language of system-generated metadata columns depends on the locale settings of the user who initially set up the connection.
You can create a mapping table that detects column names dynamically and then removes the column based on the recognized name.
Please mark this post as solution if it helps you. Appreciate Kudos.
Normally, the solution could have been to use ApiVersion 15 as mentionned in the doc:
ApiVersion: A number (14 or 15) or the text "Auto" that specifies the SharePoint API version to use for this site. When not specified, API version 14 is used. When Auto is specified, the server version will be automatically discovered if possible, otherwise version defaults to 14. Non-English SharePoint sites require at least version 15.
Excep passing `ApiVersion` doesn't work 🙂 : `Expression.Error: The following are not valid SharePoint list 2.0 options: ApiVersion.`
OK, so the only solution is to do a remapping as mentionned by @andrewsommer
This is highly unsatisfactory as if someone with a new locale works on the same report, it will not work until his/her language is added in the remapping and, much much worse, if someone (even a standard user) wants to change the name of a Sharepoint List column in his/her own locale, then it will break it all. I can't believe Microsoft did such a bad API using labels instead of unique names! Is there an area where we can tell Microsoft this must be changed?
Here an example of a working remapping:
let
Source = ..., // your source table
// Mapping from both German and English to German (display names)
RenameMap = {
{"Color Tag", "Farbkennzeichnung"},
{"ID", "ID"},
{"Content Type", "Inhaltstyp"},
{"Version", "Version"},
{"Attachments", "Anlagen"},
{"Edit", "Bearbeiten"},
{"Type", "Typ"},
{"Item Child Count", "Untergeordnete Elementanzahl"},
{"Folder Child Count", "Untergeordnete Ordneranzahl"},
{"Label setting", "Bezeichnungseinstellung"},
{"Retention label", "Aufbewahrungsbezeichnung"},
{"Retention label Applied", "Aufbewahrungsbezeichnung angewendet."},
{"Label applied by", "Bezeichnung angewendet von"},
{"Item is a Record", "Element ist eine Aufzeichnung"},
{"App Created By", "App erstellt von"},
{"App Modified By", "App geändert von"}
},
ExistingCols = Table.ColumnNames(Source),
FilteredRenameMap = List.Select(RenameMap, each List.Contains(ExistingCols, _{0})),
Renamed = Table.RenameColumns(Source, FilteredRenameMap)
in
Renamed