Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

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}
))

 

daniel_st_1-1648548121951.png

 

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:

daniel_st_3-1648548815472.png

 

Thanks Dan

1 ACCEPTED SOLUTION
Vijay_A_Verma
Super User
Super User

Use following formula

= Table.TransformColumns(#"AddColumn",List.Transform(ColumnNames, (x)=> {x, each Text.Start(_,Number.From(Text.Select(x,{"0".."9"}))), type text}))

View solution in original post

2 REPLIES 2
Vijay_A_Verma
Super User
Super User

Use following formula

= Table.TransformColumns(#"AddColumn",List.Transform(ColumnNames, (x)=> {x, each Text.Start(_,Number.From(Text.Select(x,{"0".."9"}))), type text}))

Anonymous
Not applicable

works like a charm. Thanks @Vijay_A_Verma 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.