Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Knowledge Base

Definitive answers from Designer Desktop experts.

Apply Column Rules to Multiple Columns in the Table Tool

HenrietteH
Alteryx
Alteryx
Created

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

 

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

Attachments
Comments
RichC
7 - Meteor

Hello, I see this works in your example when selecting / deselecting the year columns in the select tool: They appear/disappear as options in the table tool, as expected.

 

For some reason in my workflow, the columns are labeled only as missing, and I am unable to fully remove them from the table tool. Any ideas on this problem would be appreciated. Thanks!

Table Tool How to Forget Columns.jpg

RichC
7 - Meteor

When I deselect the 'missing' values in the table tool that are shown in my prior comment, then upon a re-run, they do disappear from the table tool (but in your example it is not necessary to deselect them). I'm not certain why it is not working like your example, but this has at least allowed me to get the columns in the correct date order once adding them back in to the select.

ELPC
8 - Asteroid

Is there a way to format only certain columns without clicking into every one and applying the formatting?  If I have a column for Actuals, Budget and Variance for every month (12 months in total) and wanted to bold only the variance columns, is there a way to do that?  Essentially something that looks like below?  

 

 

 

CategoryJul ActJul BudJul Act vs BudAug ActAug BudAug Act vs BudSep ActSep BudSep Act vs Bud
Sales100150-50150150015010050
PetraCap
5 - Atom

Hello, I do not know, what I doing wrong, but I am still getting an error even when I follow the steps above.

1] I tried to use formula and click the formula from the function table

2] I tried to use When row and select the operator and type value 0.5

 

Do you have any explanation, how to set the rule for upcoming columns which are a combination of year+month+days, there is no defined schedule, so the name of the column does not have any rule.

PetraCap_0-1646928402174.png

 

I would appreciate any comment/advice, I am really frustrated as one downloaded example from community works but what I set in my flow is not working.

Flow which works:

PetraCap_1-1646928725630.png

 

 

Thank you in advance,

Petra

fjablo
5 - Atom

Awesome! Thank you!