Formula tool icon

Formula Tool

Last modified: November 05, 2021

One Tool Example

Formula has a One Tool Example. Visit Sample Workflows to learn how to access this and many other examples directly in Alteryx Designer Cloud.

Docs are available before the release of Designer Cloud so you can get a sneak peek. This content might change between now and the official release.

Use Formula to create new columns, update columns, and use 1 or more expressions to perform a variety of calculations and operations. For a list of Functions, see the Quick Reference page.

You can use the Formula tool to...

  • Apply conditional statements.
  • Convert numbers and strings.
  • Format dates.
  • Extract file paths.
  • Apply financial algorithms or mathematical calculations.
  • Find the minimum and maximum values.
  • Analyze spatial data.
  • Cleanse string data.
  • Perform validation tests on data.

Configure the Tool

In Formula, select an Output Column of data from the Select Column dropdown. You can choose an existing column or add a new column. To add a new column of data...

  1. Select Add Column and enter the new column name.
    • Data type: Select a data type, if needed.
    •  Size: Select to change the size or width of the data for Fixed Decimal, String, or Spatial Object data types.
  2. Select the expression editor to build your expression. Once the workflow runs, the Data Preview box displays the 1st row of data from the specified column with the expression applied.

Build an Expression

Use any of these methods to build an expression.

  • Enter text directly in the expression editor.
  • Press Ctrl + Space to view a list of all functions.
  • Enter a word or phrase to view a matching list of functions.
  • Enter a [ (left bracket) to view a list of variables that you can use in the expression. Variables include...
    • Columns: Data from an incoming connection or from a column created in a previous expression.
    • Constants: Global variables for a workflow that make it possible to change a value in a single location and have that change apply to the rest of the workflow.
  • Select the Functions icon (fx) to search and browse through categories of functions.
  • Select the Columns and Constants icon (x) to search and browse through incoming or newly created columns and constants.
  • Note that the View Recent and Saved Expressions and Save expression options will be available at a later time.

Add an Additional Expression

Adding multiple expressions to a single Formula tool can be helpful when modifying data in related columns or performing similar operations. When modifying unrelated data or performing unrelated functions, using multiple Formula tools assists with workflow troubleshooting. To add an expression, select Add Formula.

Thumbnail

Reorder an Expression

The sequence in which expressions are applied affects the results when multiple expressions modify the same data. To reorder an expression, select and hold the reorder icon and then drag the expression up or down.

Thumbnail
Was This Page Helpful?

Running into problems or issues with your Alteryx product? Visit the Alteryx Community or contact support. Can't submit this form? Email us.