Forum Discussion
JWorthy
Advocate I
6 years agoFormatting Postcodes
Hello, I have a .csv of delivery information with postcodes that I need to format correctly before I import into Power BI. Below are the different incorrect ways that postcode information can...
- 6 years ago
Hi,
- Open Power Query editor.
- Select column 'Postal Code_Incorrect (how i receive them)'.
- Change data typ to text.
- Tab Add Column > Column From Examples
- Enter in the first row the postal code A9 9AA, press Enter.
- Enter in the second row the postal code A99 9AA, press Enter.
- Ok.
- Tab Transform > Format > UPPERCASE.
- Done!
Regards FrankAT
amitchandak
Super User
6 years agoTry a new column like
new column =left(table[Postal Code],search("9AA",table[Postal Code],1,len(table[Postal Code]))) & " "& if(search("9AA",table[Postal Code],1,-1)>0,"9AA","")
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin