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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors