Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Table Replace Values (Counting from the right side)

Hello all, good morning.

 

Would anyone know how to use Table.replacevalues but start counting from left to right?

 

I have some data as below and would like to change the letter from the third position, left to right.

 

DataDesired Result
LE-20LE*20
HIMAN&20HIMAN*20
DISTAT%10DISTAT*20
LUGGAGE@TOLUGGAGE*20

 

Thank you and best regards,

 

 

  • Hi Anonymous ,

     

    You can use Table.TransformColumns

    Code: 

    Table.TransformColumns(PreviousStep, {{"Solution", each Text.Start(_,Text.Length(_)-3)&"*20", type text}})

     

     

    Regards

    KT

2 Replies

  • KT_Bsmart2gethe's avatar
    KT_Bsmart2gethe
    Impactful Individual

    Hi Anonymous ,

     

    You can use Table.TransformColumns

    Code: 

    Table.TransformColumns(PreviousStep, {{"Solution", each Text.Start(_,Text.Length(_)-3)&"*20", type text}})

     

     

    Regards

    KT

  • wdx223_Daniel's avatar
    wdx223_Daniel
    Community Champion

    NewStep=Table.TransformColumns(PreviousStepName,{"Data",each Text.ReplaceRange(_,Text.Length(_)-3,3,"*20")})