Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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
Solved! Go to Solution.
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))
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))
Thank you. That sorted it!