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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Nona
Frequent Visitor

How to remove special character (/) at the end of text (URL) field

Hi, anyone can help me ?

I would like to remove  [/] at the last of the text.  Text is like [test.com/sites/A0001/].

I would like to remove last [/] and make it to [test.com/sites/A0001].

Tried this one, but actually this remove all [/] form the text not only the last of [/]....

Column = SUBSTITUTE(ABCUser[SiteURL],right(ABCUser[SiteURL],1),"")
so end result is (test.comsitesA0001), which is not what I want...
 
1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

If the character is always at the end of the field, you could just remove the last character , eg,

NewColumn = LEFT(ABCUser[SiteURL], LEN(ABCUser[SiteURL]) - 1)

View solution in original post

7 REPLIES 7
Ashish_Mathur
Super User
Super User

Hi,

This is how it is done in the Query Editor

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you very much.  I first tried in query editor but could not find way.  Thanks !

You are welcome.  If my reply helped, please mark it as Answer.  


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

Take the 1 character using right and if it is  /, the use left

 

if(right (text,1)= "/", left(text,len(text)-1),text)

 

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you very much ! this works as well. and also different way of thinking.. I will remember this. Thanks !

HotChilli
Super User
Super User

If the character is always at the end of the field, you could just remove the last character , eg,

NewColumn = LEFT(ABCUser[SiteURL], LEN(ABCUser[SiteURL]) - 1)

Thank you very much ! this works and very simple solution as well!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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