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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
MakSer
Regular Visitor

Select Columns with multiple column indexes

I am trying to select multiple columns by using column index numbers (instead of names) however below row throws an error ("Expression.SyntaxError: Token '}' expected.")

= Table.ColumnNames(#"Renamed Columns1"){2,3}

 

I expec from Table.ColumnNames to return names of the columns and select columns function to select only these columns.

= Table.SelectColumns(#"Renamed Columns1", Table.ColumnNames(#"Renamed Columns1"){2,3})

MakSer_0-1714640465988.png

I do not understand why it gives such an error because above rows works pefectly fine with single column index.

Is there any tip or shortcut for that? Thanks.

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

"I do not understand why it gives such an error because above rows works pefectly fine with single column index" - You can refer to one item of a list by index.  For more than one item you need to use List functions e.g. List.Range  or List.Combine or something else

View solution in original post

1 REPLY 1
HotChilli
Super User
Super User

"I do not understand why it gives such an error because above rows works pefectly fine with single column index" - You can refer to one item of a list by index.  For more than one item you need to use List functions e.g. List.Range  or List.Combine or something else

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.