Forum Discussion

aishak12's avatar
aishak12
Helper IV
4 years ago
Solved

Transform column (removing characters)

All,

 

I have column1 where I want to create a new column while removing some characters.

 

 

So Column1: 123456789

 

I want to create a new column2: 1234

 

 

Any suggestions?

  • Hi, aishak12 ;

    You could create a column by dax.

     

    Column2 = LEFT([Column1],4)

     

    The final show:


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • aishak12 , You can use Text.Start in power query

     

    If the column is Text

    Text.Start([Column],4)

     

    it that is number type column

    Number.FromText(Text.Start(Number.ToText([Column]),4))

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Community Support

    Hi, aishak12 ;

    You could create a column by dax.

     

    Column2 = LEFT([Column1],4)

     

    The final show:


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.