Forum Discussion
Anonymous
8 years agoNot applicable
Remove leading Zero's in Query
Hi, I need to remove leading zeros from a character string, ideally at query level. I have seen the solution: http://community.powerbi.com/t5/Desktop/Remove-leading-zero-s-from-a-string/m-p/...
- 8 years ago
You can just choose Transform - Foormat - Trim and then adjust the generated code to have zeroes trimmed from the start.
let Source = #table({"String"},List.Zip({{"000MarcelBeug","000Ol"}})), #"Trimmed Text" = Table.TransformColumns(Source,{{"String", each Text.TrimStart(_,"0")}}) in #"Trimmed Text"
Anonymous
4 years agoNot applicable
Hi,
Just found a great Youtube video with a very easy solution and it worked for me.
I created a custom column as follows: Text.TrimStart([Column], "0")
Credit: Video by Gorilla BI, link: https://www.youtube.com/watch?v=NGE1EFOiguY