Change values in a column based on set rules

Group    ID
   1      09239820
   2      2872498938
   2      1267
   3      23219823983
   3      267839236
   4      33287442

I want to replace the 1st, 2nd and 4th numbers in the ID column with letters

   Replace 1st with N
   Replace 2nd with X
   Replace 4TH with D 

Expected output:

    Group    ID
     1      NX2D9820
     2      NX7D498938
     2      NX6D
     3      NX2D9823983
     3      NX7D39236
     4      NX2D7442

Hi @tjmbakwe,

you can use a string maniplulation node with join("NX", substr($ID$, 2, 1), "D", substr($ID$, 4)):
image

Best, Lukas

4 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.