Hi all!
I am trying to filter a dataset to include only numbers that are 9 digits in length - here is my formula:
length(tostring([column1]))=9
the issue is that if the number has a leading 0, it does not see that as 9 digits. Is there a different way to write this to include the leading 0 in the count?
Thanks in advance!
Solved! Go to Solution.
convert it to string first/import it as a string
Hi @svargas01 ,
You are almost there! I would use Regex replace to strip leading 0s:
length(REGEX_Replace(tostring([column1]),'^0+',''))
Hope it works,
Oly
hi @svargas01
If I am not wrong you need to count the numbers excluding 0 in front. then you can achieve this by using the below formula in the formula tool and then filtering it with the filter tool.
Length(TrimLeft([Column1], '0'))
Let me know if you have any other requirement , thanks
thank you all! the regex fixed it!