Forum Discussion
Use Text.Start function dynamically based on column name
Hey guys,
I'm working on a solution to dynamically applying the Text.Start function.
What I want to achieve is to pass the Level Number of the column name to the function:
= Table.TransformColumns(#"AddColumn",
List.Transform(ColumnNames,
each {_,each Text.Start(_, 3), type text}
))
Do you have any idea on how to get the value out of the column name and pass it to the function?
The expected result should look like this:
Thanks Dan
Use following formula
= Table.TransformColumns(#"AddColumn",List.Transform(ColumnNames, (x)=> {x, each Text.Start(_,Number.From(Text.Select(x,{"0".."9"}))), type text}))
2 Replies
- Vijay_A_VermaMost Valuable Professional
Use following formula
= Table.TransformColumns(#"AddColumn",List.Transform(ColumnNames, (x)=> {x, each Text.Start(_,Number.From(Text.Select(x,{"0".."9"}))), type text}))
- AnonymousNot applicable
works like a charm. Thanks Vijay_A_Verma