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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
FCD
Regular Visitor

Moving a column at a specific place (column B) without Permutation

Dear All,

How to move a column at a specific place. i.e. after a column called Id.

I just don’t want to move it beacuse the quantity and the names of the columns before are variable in my code.

 

Thank you for your help.

Best Regards

2 REPLIES 2
FCD
Regular Visitor

I meant I did not want to drag and drop my column because the advanced Editor write the code like

Table.ReorderColumns(#"RenamedCol",{"Id", "MovedColName", "C1", "C2", "C3", "...", "Cn"})

The quantity and the names of columns C1 to Cn are variable according to a combination.

That's why I wish I could place the column MovedColName at a second position indepndant from C1, C2, etc.

Thank you for your help.

 

AlienSx
Super User
Super User

Table.ReorderColumns(tbl, {"called Id", "column_name"})

but wait.. "I just don't want to move it..." at the same time sounds strange

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.