Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (17.6k points)

So, I have a datalist of cities saved in Excel, which I want to visualize in PowerBI. However, some of the cities contain a zipcode. This zipcode only exists from numbers.

Is it possible to replace all numbers in that column with "" (nothing)? Or another option is to check if the value starts with a number and then removes the first 4 characters in that cell?

Any ideas on how this can be done?

1 Answer

0 votes
by (47.2k points)
  • Trim the start of your columns ("Custom") entries using this command:

Table.TransformColumns(NameOfPreviousStep,{{"Custom", each Text.TrimStart(_,List.Transform({0..9}, each Number.ToText(_)))}})

Browse Categories

...