Forum Discussion

Simon_Br's avatar
Simon_Br
Helper I
2 years ago
Solved

Text.End Variable Value

Hello Comunity,

 

Actaul i have the challange, an value to split whit a dynamic value in the M-Code in Power Query.

 

Per Example:

 

TextLength NumberSolution

America30

230
Australia3003300
China48500548500
Africa444
Europe154879371548793

 

How can i do that?

 

Simon

 

  • Hi Simon,

     

    This should work fine in a new custom column:

     

    Text.End([Text], [Length Number])

     

     

     

    Pete

3 Replies

  • wdx223_Daniel's avatar
    wdx223_Daniel
    Community Champion

    Splitter.SplitTextByCharacterTransition(each not List.Contains({"0".."9"},_),{"0".."9"})([Text])

  • Thank for the answer.

    And whit the length? ... each Text.End(_, value(length number),... 

     

     

  • Hi Simon,

     

    This should work fine in a new custom column:

     

    Text.End([Text], [Length Number])

     

     

     

    Pete