Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
Is there a way to trim the last "/" and keep the value in same column?
Here's what has been done.
Then, I add one more step and try to remove "/" in last characters, then I tried to change the code but then got error:
If I use the Addcolumn, the code is:
Table.AddColumn(#"Lowercased Text", "Trim", each Text.TrimEnd([Page],"/"))
But this does not work if I want to keep the value in same Column.
Could you please help.
Thanks!
H
Solved! Go to Solution.
@Anonymous
1. On the Transform tab, select your column and choose Format - Trim.
2. Change the code:
Text.Trim to each Text.TrimEnd(_,"\")
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
@Anonymous
1. On the Transform tab, select your column and choose Format - Trim.
2. Change the code:
Text.Trim to each Text.TrimEnd(_,"\")
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
Thank you @Anonymous 👍
hello @Anonymous ,
Do like this:
let
Source = Excel.Workbook(File.Contents("C:\Users\kgawale\Desktop\powerBIcommunity.xlsx"), null, true),
Sheet2_Sheet = Source{[Item="Sheet2",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Sheet2_Sheet, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Order", Int64.Type}, {"Tasknumber", type text}, {"Department", type text}, {"Creation date", type any}, {"Data", type text}}),
#"Removed Bottom Rows" = Table.RemoveLastN(#"Changed Type",3),
#"Split Column by Delimiter" = Table.SplitColumn(#"Removed Bottom Rows", "Data", Splitter.SplitTextByEachDelimiter({"/"}, QuoteStyle.None, true), {"Data.1", "Data.2"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Data.1", type text}, {"Data.2", Int64.Type}})
in
#"Changed Type1"
Right click on the column, Split column option->By delimiter
select or Enter the delimiter->Keep custom and \
Split at -> Right most delimiter
Quote character-> None
Maybe I didn't state clearly.
What expected is not split into 2 columns, but remain the value in same column just remove the last "/" if there is.
e.g.
before:
After:
Thanks for reply.
Hello @Anonymous ,
I am not sure if you would like to create new column or not.
But you can achieve similar result by creating new column in report.
@AnonymousAs in OP mentioned, ideally, it's better remain in same column, but not split to 2 columns or create a new column. But Thanks for your idea and replies, I will try on creating new column and to see if there is any further actions required on further progress.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 103 | |
| 79 | |
| 57 | |
| 51 | |
| 46 |