Professional Documents
Culture Documents
Alteryx101forExcel Tableau Users
Alteryx101forExcel Tableau Users
You have a data file. You need to manipulate some data in the file (changing or cleaning some data, adding or
removing rows or columns). In Excel, this can take hours, if not days. How do you save yourself time by doing it in
Alteryx? In this handy crib sheet, we’ve listed the most common manipulations and how you might approach them
using Alteryx.
Alteryx is like a big flow chart, so if you can write down the steps or draw your process, then you’ll find building your
workflow a lot easier.
Before we start
We should be aware of the optimal structure of data in Excel or CSV files. Across the first row should be field headings,
so that every column contains data about one piece of information. Each row should have data in the correct columns,
where each row is a collection of data such as a reading, invoice line, web page visit, or the suchlike.
There should also be no totals and no merged cells. If this is the case, then we’re good to go. If not, don’t worry, we
can fix it using Alteryx, using some of these tools, but you may need additional tools such as Dynamic Rename (which
allows you to take a row of data and turn it into column names). If you’d like assistance with that, please get in touch.
Rename columns
This is easy to do in Excel: you just rename the fields in column 1.
It’s also easy to do in Alteryx: you use the Select tool (in Preparation). Select Tool
Alteryx has a defined data type, like a database. If your input files are CSV you’ll definitely need to change types (as
they will all come in as text), and if Excel it’s highly likely. You can easily change this, again, using the Select tool.
There are some conversions which are a little more complex. Dates can be awkward, because the
Select tool may not be able to understand your preferred date format. To satisfy this, there is a
specific DateTime tool (in Parse). Date Time Tool
Replace values
Do you go through columns changing values? Perhaps you apply a quick filter and copy a formula down a table? This
is a big risk in Excel, as the copy down can stop if there’s an empty cell to the left. In Alteryx, as in Tableau, you only
have to write the formula once, and it will be applied to every row, so you know it will be consistent.
If you are taking data into Tableau, you could use its Alias function, which allows you to take the value of a field and
replace it with another. However, this doesn’t work if you need to change multiple original values to a single new
value, for instance if you’re cleaning spelling mistakes or adding a higher level of a hierarchy. If that’s the case, then
you could create a Group in Tableau.
In Alteryx, the best advice is to create a new field, following the next section.
If you’re splitting a field with a regular format (for instance, maybe splitting a comma separated address
field) you could use Text To Columns (on Parse) or the more complex RegEx to break your field down by
a certain character. Text to
Columns Tool
If you need multiple matches to have their own rows, then a join would be better. You can input two
data sets and join them using either the Join or the Join Multiple tool in Alteryx, or if you’re connecting
to a compatible data source, you can actually join them in the Input tool. There is more information on Join Tool
Joins on our blog, by Laszlo Zsom.
If you only want to replace certain values, for instance only change incorrect spellings, you could also look at Find
Replace (in Join) which allows you to keep original values unless they’re in your list.
Remove columns
You have just created your nice calculated field and want to delete the original. In Excel you cannot just delete the
original without having to copy and paste values, otherwise your formula will break. In Alteryx this is not a problem.
Just use the Select tool and untick the box next to anything you don’t need, and it will be removed from your
workflow. This is great if your workflow has large volumes of data passing through it.
Remove rows
This is either a manual selection in Excel, or using a quick filter to find what you don’t need. If you can
list the criteria then you can use Alteryx’s Filter tool (in Preparation). If it’s complicated, you can use a Filter Tool
Alteryx also has a really useful Sample tool (in Preparation) which allows you to limit the number of rows. This could be
useful if you are looking for a random selection or only want to use the first few rows whilst you test Sample Tool
whether your module works.
Sort
There may be some situations when you need your data to be in a specific order, for instance, if you
need to do a Multi Row Formula (there’s a tool for that too in Preparation) for, say, a running total. Sort Tool
The Sort tool (in Preparation) allows you to organise your data how you want it.
Reorder fields
The order of your fields is not important if you’re bringing your data into Tableau, but if you wish to reorder your
columns then you can do so using the Select tool.