Feature image for article on how to negatize numeric values in Alteryx.

While you’re working with data in Alteryx, you might find yourself in a situation where, prior to exporting your data, you need to “negatize” the values of a dataset — i.e. make all positive values negative and all negative values positive, or “flip the sign”. This is easily accomplished using the Formula tool in Alteryx with the following logic in the Formula tool’s expression (see below screenshot):

[FieldToNegatize] * -1

Screenshot of Alteryx illustrating use of the Formula tool to negatize values of a field within a dataset.

… where “[FieldToNegatize]” references the name of the field in the dataset the values of which you want to negatize. Note that because the above expression is a mathematical expression, the field you perform it on must have a numeric datatype or you will get the following error:

Screenshot of a data type error in Alteryx illustrating that a field must be a numeric data type in order to be negatized in Alteryx.

The result of the above, as configured, will be a new column with the negatized values of the original column:

Screenshot of the results pane in Alteryx showing the negatized values resulting from use of the Formula Tool as described in this article.

Download the example workflow used in this article here: Negatize-Values-Using-Formula-Tool.yxmd (6.39 KB — right click on file link and select to “Save Link As…” or “Download Link”, etc.)

Blake is a CPA and a law school graduate specializing in taxology, tax and finance process automation and optimization, and cloud accounting systems.

Leave a Reply