community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx Knowledge Base

Definitive answers from Designer experts.

Apply Column Rules to Multiple Columns in the Table Tool

Alteryx
Alteryx

The Table Tool has many options for formatting data - e.g. prefixes and suffixes can be added, certain fields can be highlighted based on formulas and many more. For an overview of the tool, take a look at the Tool Mastery article for the Table Tool

 

What to do if you want to format more than one column at once? There is a workaround using the "Dynamic or Unknown Fields" option. 

 

Let's say we have a data set of annual sales by state, like this:

 

dataset.png

 

The three numeric columns should include $ and only show two decimals. We'll also make the years in the headers bold. 

 

This could be applied to each column individually but that would have to be done three times and it would have to be done again for each new year that is added to the data. Much easier to do it once for the "Dynamic and Unknown Fields" which also applies to any new fields. 

 

To do this, use a Select Tool to remove all columns but "State". Then create the data formatting rules for the dynamic fields: 

 

dynamic field formatting.png

 

Add the fields back in the Select Tool, the Table Tool picks them up automatically and applies the rules you just created:

 

2016 formatting.png

 

Resulting in a nicely formatted table: 

 

table.png

 

Once 2017 is added to the data, it will automatically format that column as well.

Contributors