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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Reorder columns by listing only those column names to be moved

I have a Power Query that imports data from JSON URLs which I am constantly switching so that many of the headers change

But All JSON data share some headers

 

{"Id", "Label", "Email", "Project Name", "Type", "Segment", "Description", "First Name", "Last Name", "Email 2", "Email 3", "Initial Date", "Last Date", "Image"}

 

I want to move these to the "front" of the table

I tried this

 

#"Appended Query" = Table.Combine({#"Changed Type", addMissingEmails}),
#"Reordered Columns" = Table.ReorderColumns(#"Appended Query",{"Id", "Label", "Email", "Project Name", "Type", "Segment", "Tags", "Description", "First Name", "Last Name", "Email 2", "Email 3", "Initial Date", "Last Date", "Master ID", "sumApp Link", "Image"},MissingField.Ignore),

 

 But it does NOT move ALL columns listed to the front of the table

 

Is there a way to do this?

Thank you in advance

1 ACCEPTED SOLUTION
ronrsnfld
Super User
Super User

Something like:

 

firstColumns = {"Id", "Label", "Email", "Project Name", "Type", "Segment", "Description", "First Name", "Last Name", "Email 2", "Email 3", "Initial Date", "Last Date", "Image"},

#"Reordered Columns" = Table.ReorderColumns(#"Appended Query",firstColumns & List.RemoveMatchingItems(Table.ColumnNames(#"Appended Query"),firstColumns))

 

 

View solution in original post

2 REPLIES 2
ronrsnfld
Super User
Super User

Something like:

 

firstColumns = {"Id", "Label", "Email", "Project Name", "Type", "Segment", "Description", "First Name", "Last Name", "Email 2", "Email 3", "Initial Date", "Last Date", "Image"},

#"Reordered Columns" = Table.ReorderColumns(#"Appended Query",firstColumns & List.RemoveMatchingItems(Table.ColumnNames(#"Appended Query"),firstColumns))

 

 

Anonymous
Not applicable

Thank you. That sorted it!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors