Forum Discussion
Till__
3 years agoHelper I
Splitting Columns without generating new column
Dear Community, I want to split serveral columns after if it changes from number to text. For example the entry is 2xyx and I only want to have the 2 left over. Test 2xyx Normaly a ne...
AntrikshSharma
1 year agoCommunity Champion
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMqqorFCK1QEzjCsqE5NMLUws9QyNTItzrBPTlGJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Test = _t]),
Extract =
Table.TransformColumns (
Source,
{
"Test",
( ColumnValue ) =>
let
Split =
Text.ToList ( ColumnValue ),
SelectNumbers =
List.Select (
Split,
( x ) => List.Contains ( { "0" .. "9" }, x )
),
Combine =
Text.Combine ( SelectNumbers ),
ToNumber =
Number.From ( Combine )
in
ToNumber
}
),
ChangeType =
Table.TransformColumnTypes (
Extract,
{ "Test", Int64.Type }
)
in
ChangeType