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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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)

 

 

Share with Power BI Enthusiasts: 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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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