Analytic App in Alteryx - Part 1

by Jyoti Gupta

Analytic App can be described as a workflow which has a User Interface to perform certain task. It is really effective way to let your user input data to control what is happening without showing them your actual workflow.

Let’s take a simple example: We want to build an app for superstore (using superstore dataset). Its interface will let users:

  1. To choose a State using a drop down
  2. To choose whether they want to see sales, profit, discount or all three for the orders in that state.
Superstore App (created in Alteryx)

So let’s get started!

Step 1: Create a workflow

To get started, we first need to create a workflow. So let’s break down the problems in two parts. First we need to filter the dataset on the State and Second we need to select the columns we want to show in the output. This breakdown implies we need a Filter and Select tool. So our workflow looks like this:

Initial Workflow

Step 2: Automate it

Now our workflow works for the parameters we have set in filter and select tool. To automate it we need to tweak it a bit.

Let’s work on Filter first. We want a drop down menu of states for our user to select from. In the tool bar, go to Interface tool pallet and drag Drop Down tool on the Canvas. To configure it, go in configuration Pane of the tool. We want it to select the state so we will type “Select a State” in the first box. From List Values dropdown, we will select – "Manually set values(Name:Value-one per line)".

Drop Down Tool in Interface Tool Pallet
Configuration of Drop Down Tool

To input the list of states in this tool, we need to do an extra step. We will use a Summarize tool after our input and configure it to just States - Group By. This will give us a list of states. Copy these values by right clicking in result pane and selecting “Copy all records without header” and paste in the Properties section of the Drop Down Tool.

Summarise Tool - to get list of states

Connect bottom anchor of Drop Down tool to the lightning anchor of Filter tool. This will add action tool in between. Configure it by selecting “Update Value (default)” in the select an action type. Now we have to select what values we want to update via Drop Down tool in the Filter. The answer is state. So in value or attribute to update section of Action tool, select “Field – value= ‘State’”. Now our Filter tool is automated.

Configuration of Action tool, connected to Drop Down and Filter Tool

Coming to the select tool, we want to give user a choice between Sales, Profit and Discount column. They should have an option to select single or multi values. From Interface tool palette, drag List Box tool on the Canvas. Connect the output of true anchor of Filter tool to the upper anchor of List Box tool.

In the configuration pane of List Box tool, write the text you want the user to see, eg. we can write: “Select what you want to see” or “Choose”. In the Properties section, uncheck all and select just Doubles.

Connect bottom anchor of List Box tool to the lightning anchor of Select tool. This will add action tool in between. Configure it by selecting “Update Select with multi-select ListBox” in the select an action type.

Configuration of Action tool, connected to List Box and Select Tool

Now our Workflow looks like this:

Final Workflow

Step 3: Convert it to an App

Click on empty space on canvas and from workflow configuration pane go to Workflow. The type should have automatically shifted from workflow to Analytic App and if not, Select Analytic App. Save it as an .yxwz.

Go back to your canvas. Now you should see a wand just before the Run button. Press it and your workflow now should run via an interface. Our app is up and running!

Step 4: Configuring the User Interface

We need to work on the appearance of the User Interface. Open the Interface designer from the View. In Interface Designer, double click on question tab and give a name to your app, say “Superstore App”. Now go in the setting section, check the “On-Success – Show Results to user” and  “Browser” box. This will enable users to see the results based on their selections.

Configuration of Interface Designer

You can also add an image/logo to your interface. Check the “Use Graphic” box and browse any image from your gallery.

Hit wizard button and you should see the User Interface of the app.

User Interface of the Superstore App

The app we created just used one workflow. However, we can create an app that can run multiple workflows. These are called Chained Apps and will be covered in next blog.

Stay Tuned!