Will this break Alteryx? Well no, but yes

by Chris Meardon

The Multi-field formula tool has an expression window that uses a particular form of syntax to refer to fields.

If you wanted to multiply Field 1 by Field 2 in the following table to create a new field, you could use this tool and set it up as in F.1.

The starting point

definitely not the best way to achieve the goal but bear with me

F.1 – The initial configuration. 1 – selecting the field. 2 – setting the expression

We can select Field 2 and use an expression to multiply it by Field 1. The syntax for Field 2 is now [_CurrentField_] as we have it selected. This will give us the results as shown below; Field 1 x Field 2.

Lovely expecting results

BUT

What if the first field was called _CurrentField_ ?
i.e

The renamed field

Our expression will then become:

The scary expression

But, what will Alteryx think _CurrentField_ is? The field with that name (A) or the field that is relatively the current field (B)?

What is now the _CurrentField_?

Press your buzzers now

The results

It turns out Alteryx uses the relative current field (option B), hence produces these lovely square numbers.

I’m sure this will be incredibly useful for all your Alteryx workflows…

A square result
Avatar

Chris Meardon

Fri 27 Mar 2020

Fri 27 Mar 2020

Tue 24 Mar 2020