Creating an Alteryx Analytic App

by Isabel Cooper

Analytics apps in Alteryx are workflows with a user interface, which enable a user to run the workflow and view an output without having to actually open and interact with the underlying workflow itself. With apps, users can perform custom analyses without needing knowledge of Alteryx Designer.

This blog post covers how to create a simple app in Alteryx, using weekly challenge number 225. The challenge is to create an app which calculates the difference between a user-inputted date and today. The user should also be able to select which units the results are displayed in.

Step 1: Build your workflow

This workflow essentially takes an input date, and calculates the date time difference between today and the input date in a variety of units.

A few tips: input the date in Alteryx’s default date format yyyy-mm-dd, so you can easily change the data type in a select tool.

Also, Alteryx’s DateTimeDiff function doesn’t support the weeks unit, so for this I used the following calculation:

Floor(DateTimeDiff(DateTimeToday(),[Date input],'days')/7)

Step 2: Add and configure the interface tools

This challenge required two inputs from the user: a date to compare with today, and the units of time to display the results in.

For the date input, I brought in a Date interface tool and connected it to my text input. I edited the display text in the date tool to something more user-friendly, and left the action on the default ‘Update Cell’:


The second part needed a little more configuration. I brought in a List Box tool (allows the user to select multiple values from a list), and connected it to my second select tool. I edited the display text, and left it on ‘Select Tool Mode’. In the action tool, I chose ‘Update Select with multi-select ListBox’. I then connected the output from the formula tool to the List Box, to provide the list of units to the user can select. Because my units were all V_WString data types I selected all V_WString fields in the list Box configuration.

Finally, to configure your app to show the user the results from the browse tool, open the interface designer (from ‘View’, or ctrl + alt + D). Click settings, tick ‘On Success - Show Results to User’, and tick the relevant browse tool. You could also use an output tool, and output an actual file when a user runs the app.

Step 3: Save as app, and test

In the workflow configuration pane, your type should have been converted to Analytic app. You can now save it as a .yxmc file type.

Finally, click the wand next to the run button to test out your app, and make sure it is all running smoothly!

Avatar

Isabel Cooper

Wed 15 Dec 2021

Fri 03 Dec 2021

Tue 23 Nov 2021