How to Rename and Re-Order Columns in Alteryx

The Alteryx Select Tool is one of the most widely used and versatile tools in Alteryx. It allows users to remove columns, rename fields, re-order columns, and change data types all within a single tool. It’s so versatile that you’ll often see a Select Tool deployed at the beginning of a workflow, several times in the middle and right before the end.

Using the Alteryx Select Tool to adjust column names. remove fields, and re-arranging columns is not only best practice at the beginning of a workflow to help make your workflow run faster and make development easier. They’re essential for adjusting the output of a workflow and getting it ready for presentation.

Let’s dive in!

An Introduction to the Alteryx Select Tool

The Alteryx Select Tool is available in the preparation section of the Alteryx Toolbar. It’s used to adjust column names, change column order, modify data types, and select or de-select columns to remove them from a data set.

Where to find a Select Tool in the Alteryx Preperation section

As a best practice, we recommend adding a Select Tool as close to the beginning of your workflow as possible to optimize the speed of your workflow. Because a Select Tool can be used to remove columns, it’s best to remove them early on to reduce the amount of data Alteryx has to process in each subsequent tool.

An added benefit of removing data early on is readability. For example, it’s much easier to navigate a workflow with a dozen columns than one with 40 columns. You’ll spend less time scrolling across unneeded columns or looking for a specific field among many of them that are not needed. Re-ordering your columns into a logical structure can also help reduce confusion later on.

How to Rename Columns in Alteryx

To manually rename columns in Alteryx, add a Select Tool from the Preparation section of the Alteryx Toolbar. Connect it to your workflow and use the Rename Field to the right of a column name to type in the new name of a column. Name changes will be highlighted in yellow to designate the field has been updated.

Example of renaming columns using a Select Tool in Alteryx

Be careful to make sure that your renamed columns are short yet descriptive to make it easy to remember what the data is representing and to make the workflow easier to maintain in the future for yourself or for others who may have to edit it in the future.

Renaming Columns Dynamically in Alteryx

Use the Dynamic Rename Tool from the Developer Tool Section to rename multiple columns at one time in Alteryx. Set Dynamic Rename to Formula mode, select columns to update and use a Replace Formula with the syntax: Replace([_CurrentField_],”Value”,”Replacement”).

The example below shows a Formula Configuration looking for the word Category and replacing it with Cookie Name.

Using the Dynamic Rename Tool in Alteryx to rename a number of columns at the same time with a formula

This is a simple single column example, often you would be replacing special characters like _ with a space ” “.

The Dynamic Rename Tool also has a number of additional notable applications. Most commonly, it’s used to promote headers from the first row of data. It can also be used to replace values in column headers using formulas, add prefixes, or rename columns based on external datasets.

You can explore more of the functionality of the Dynamic Rename tool by right-clicking on the Dynamic Rename Tool and selecting “Open Example” from the Alteryx Toolbar. This will bring up a new tab in Alteryx that highlights all of the different configuration options that are available.

Example of how to access Tool Examples for configuration information

The Dynamic Rename Tool is our preferred method when working with large datasets to avoid having to manually type in the names of many different columns using a standard Select Tool.

How to Reorder Columns in Alteryx

Use the Select Tool from the Preparation section of the Alteryx Toolbar to change the order of columns in a workflow. The Select Tool configuration panel shows a list of columns. Top to bottom they correspond left to right in the workflow results. Use the arrow buttons at the top or hold your right-mouse button to the left of the Field Name to drag them into order.

Using a Select Tool to change the order of columns multiple methods

Columns can also be re-arranged in Alteryx using the Arrange Tool in the Transform section, but this tool is not widely used and can be more difficult to configure than a Select Tool.

Using a Template to Set Column Order

If you have many different columns to put into a specific order, it may be easier to use a Text Input Tool with a template. You can create a template or an outline of column headers using Excel or another Tool. Then import the file or place the headers into a Text Input Tool. Use a Union Tool with the template as connection #1 and your data set as connection #2.

Because the Union Tool will auto-match column headers by name based on the first input, this forces all of the other columns going into the Tool to match the order of the first tool.

How to De-select or Remove Columns Alteryx

To remove columns from your data set in Alteryx, use the Select Tool from the Preparation section of the Alteryx Toolbar. The Select Tool gives a list of columns in your data set. Connect it to your workflow, then un-check the columns you want to remove. They do not move forward in the workflow but can be added back later if needed.

Selecting and de-selecting columns using a Select Tool

The Options Menu of the Select Tool has a number of notable options, such as the capability to select or de-select all columns. You can also reset the incoming data to forget renamed columns, add prefixes or suffixes etc.

The “Unknown” check-box in the Select Tool toggles whether to allow columns not listed above to move through your workflow. You can disable it if incoming data tends to change or have columns added to it over time.

As a best practice, we recommend removing unnecessary columns early on in your workflow. It reduces the amount of data being processed by subsequent tools and speeds up your workflow. It also makes it easier to develop processes because you don’t have to visually sort through unnecessary data.

When working with large data sets that take a long time to import, you may want to consider limiting the number of columns coming into Alteryx in the first place. If connected to a live data source it can often be done with a SQL query. This limits the amount of data transferred to your local computer for processing and will reduce the time it takes to download data before a workflow starts.

Removing Columns by Filtering Field Names

To dynamically remove columns in Alteryx, you can use a combination of the Transpose Tool, Filter Tool to remove columns based on their name, and then put the data back in order using a Cross Tab Tool. This essentially pivots the data into two columns so you can filter based on rows, then it gets un-pivoted back to its original form.

The workflow would look like this:

How to dynamically filter out column names using a combination of several Alteryx Tools.

A Record ID Tool is used at the beginning of the workflow to maintain row order and give a primary key to Cross Tab Rows back into place after the filtering.

Because a filter tool can only be applied to rows, this data shape lets you apply dynamic filters based on a single column of table names. Then it gets flipped back around by the Cross Tab tool so it looks like the original data.

If your column headers have spaces or special characters, you may need to use a Dynamic Rename Tool to replace the underscore with a space as the Cross Tab will automatically replace special characters.

Conclusion

Renaming and Reordering columns in Alteryx is usually done with the Select Tool. It’s one of the most common and most useful tools within Alteryx. The only drawback of using a Select Tool is that it can be burdensome when working with large datasets and isn’t dynamic.

For scenarios where you need to rename a large number of columns, try the Dynamic Rename Tool. If you need to change the order of many different tables of data or one very large one it can be easier to use a template built in Excel that can be Unioned into your data set or you can also attach a list of column headers in order into a Dynamic Rename Tool.

Do dynamically filter columns out of a data set, use a combination of Transpose, Filtering, and Cross Tab Tools. Once column headers are in a single column, you can easily apply filters and formulas to the column headers before putting them back in place.

Scroll to Top