Showing results for 
Search instead for 
Did you mean: 

Alteryx Designer Knowledge Base

Definitive answers from Designer experts.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?


Spatial Functions with the Formula Tool

Sr. Instructional Designer
Sr. Instructional Designer
Created on

Alteryx’s spatial functions are not limited to the tools found in the Spatial Palette.  The Formula Tool, for example, has a variety of spatial functions that expand the Designer’s spatial capabilities beyond those in the Spatial Tool Palette.  This article highlights the Formula Tool’s ability to create spatial objects, particularly points and lines, and calculate distance using the built-in expression library (Figure 1).


2019-02-28_16-30-50.pngFigure 1: One of the Formula Tool's expression library contains spatial functions, which can be used to create spatial objects, perform spatial calculations, and retrieve spatial information.



For the most part, the spatial functionalities included in the Formula Tool expression library are available in tool in the Spatial Palette.  However, rather than dragging on multiple spatial tools to complete a process, using the spatial expressions in a single Formula Tool allows you to create a more streamlined workflow.  Consider the example workflow that accompanies this article.  The input data consists of two sets of Lat/Long coordinates, one for the start point and one for the endpoint.  The objectives of the workflow are to 1) create points for the start and end locations, 2) create a line connecting the start and end locations, and 3) calculate the distance between the two points.  Believe it or not, all three of these processes can be accomplished using a single tool!  In the attached v10.0 workflow, Workflow A (top) uses four expressions in a Formula Tool (Figure 2A).  Workflow B (bottom) uses the spatial tools to accomplish the same task.  This approach requires 8 different tools to configure the data, create spatial objects and perform the distance calculations (Figure 2B).  Both workflows achieve the same results but, in the spirit of minimalism, the Formula Tool’s ability to handle spatial processes efficiently and effectively certainly deserves some kudos!


                                                                          2019-02-28_16-34-18.pngFigure 2A: Completing spatial functions in a Formula Tool.



2019-02-28_16-36-13.pngFigure 2B: Using Spatial tools (and others) to complete the task.  Green text boxes indicate which expression(s) in the Formula Tool accomplishes the same task.