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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

How to escape special characters in field name

Hello World!

 

I have a special character in my field name that is causing an error in my load. This field is referenced in a field select function.

 

fieldselect = "&$top=5000&$select= Author/Title, ASM/Supervisor/Title, Editor/Title, AssignedTo/Title&$expand=Author,Editor,AssignedTo"

 

The name of the field is "ASM/Supervisor". Does anyone know of a solution to escape this special character within field select?

 

Thanks in advance.

5 REPLIES 5
Rudz
Kudo Collector
Kudo Collector

This looks like OData. I think you just use ASCII escaping, so / is %2F.

 

fieldselect = "&$top=5000&$select=Author%2FTitle, ASM%2FSupervisor%2FTitle, Editor%2FTitle, AssignedTo%2FTitle&$expand=Author,Editor,AssignedTo"

 

This page is a good reference for other special characters: HTML URL Encoding Reference (w3schools.com)

v-yingjl
Community Support
Community Support

Hi @Anonymous ,

Based on the description, not certain where did you use it in a 'field select function', and what's the error message it shows.

Maybe you can share more details like the error message and the query you have quoted this field for further discussion.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Fowmy
Super User
Super User

@Anonymous 

Not clear if you need to remove special characters from the whole text, if so in Power Query, add the following as new custom column

= Text.Select([Your Field Name],{"a".."z","A".."Z","0".."9"," "})

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

No need to remove. I have a "/" in my field name "ASM/Supervisor" that, when refernced in fieldselect, brings back an error. I need to escape this special character so that the field name is readable.

@Anonymous 

Did not understand what is "fieldselect" here. Can you explain a bit not more? Is it power query ?

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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