19.7.11

Add a space to postal code (splitByLength and Merge function)

This short tips explains how to convert postal code store on 6 characters to 7 by adding a space after 3 digits. We will use splitByLength (see related video) and merge multiple column into one functions.


  1. First, facet your postal code column by text length = 6
  2. Then edit your cell with the following expression:
    splitByLengths(value,3,3)[0]+ " "+splitByLengths(value,3,3)[1]
Let's have a look at what we did:
  • splitByLengths(value,3,3)[0] will split your postal code into 2 strings of 3 characters and select the first one using the identifier [0]
  • + " "+ will add a space between the 2 strings
  • splitByLengths(value,3,3)[1] will split your postal code into 2 strings of 3 characters and select the second part using the identifier [1]

This post was

0 comments:

Post a Comment