Get startedGet started for free

Completing the workflow

1. Completing the workflow

This workflow is starting to take shape. Let’s perform one more preparation step before moving on to something else. Ensuring no duplicate values in our dataset would be a good idea at this stage. Let’s check the first Browse tool we added to the Input Data tool. Our dataset contains information about each country - so each country should only appear once. Therefore, this column is our unique identifier. But in the browse tool, we can see 228 Records, with 227 being unique. This means we have a duplicate in our dataset. From the preparation toolset, we can add the Unique tool to the end of the workflow and connect it to our sort tool. We will select All from the column options in the Configuration window to ensure that any entirely identical rows can be identified. The Unique tool has two output anchors - one called Unique and the other called Duplicates. If we run the workflow and select the Unique tool, we can see the different results for each anchor in the Results window by clicking on the corresponding output anchor. It looks like we had two entries for Panama. We only want unique values, so the rest of the workflow will be connected to the Unique output anchor, which will keep the first record of Panama. Although the dataset is relatively small at just over 220 records, if you aggregate it further, you can start getting some insights. So, let’s head to the Transform toolset and add the Summarize tool. In the configuration window, we can start making selections based on the columns we want to aggregate and group the data by. Using this dropdown menu, we can select multiple columns based on their data type. We will group our summarized data by Region, as this will include groups of countries. After selecting the column, we can choose what role it will play in the aggregated data by selecting the option we want in the Add dropdown menu. Here, we will select Group By for the Region. We then want a count of the number of countries in each Region. So we select Country in the Fields, then Count in the Add menu. Let’s add each region's average population and area per square mile. We can select both of these columns in the Fields section, and then in the Add dropdown, we can go to the Numeric section and select Average. In the Actions section, we can change the name of the columns created in our summarized dataset. Let’s change the Count to Number of Countries. Nice. OK, so if we run the workflow and view the output of the Summarize tool, we can see a table with the four columns we added, with information displayed for each region. It is easy to see that the Sub-Saharan Africa region has the most countries. And with some Sort tools, we could easily determine which region has the highest average population. This information will be useful to share, so let’s use the Output Data tool to save it to a CSV file. Let’s drag the tool from the In/Out toolset and connect it to the output anchor of the Summarize tool. In the configuration window of the Output Data tool, we can choose the type of file we wish to save the data from our workflow and the location where it will be saved. Before saving the workflow, let’s document some of the actions taken. Alteryx Designer has a Documentation toolset that contains the Comment tool. Once we drag it to our canvas, a text box appears. We can double-click on it to start typing. Let’s mention that we found one duplicate value and have removed it. In the Configuration window, we can change the font size, the comment's shape, and even the background color. We can also resize and move the comment tool to place it where we desire on the canvas. Now it’s your turn to try out some exercises.

2. Let's practice!