pbPassingBI
/
Workflow & automation intermediate 6 min

Parsing tools

Text to Columns, RegEx and DateTime — pulling structure out of messy fields.

What you'll be able to do
  • Split a field into several
  • Extract with RegEx
  • Parse text into real dates

Text to Columns

Splits one field on a delimiter, either into new columns or into new rows.

Splitting to rows is the useful one people miss: a field holding widget, bolt, nut becomes three rows, which is exactly what you need before grouping or joining on individual values.

RegEx tool

Four modes:

MethodDoes
MatchReturns true/false — good with Filter
ParseSplits into fields using capture groups
ReplaceSubstitutes matched text
TokenizeSplits every match into rows or columns

Parse mode with capture groups is the one worth learning — (\d{3})-(\d{4}) on a phone field gives you two clean columns.

RegEx is also the tool for stripping unwanted characters: replacing [^0-9] with nothing leaves only digits.

DateTime tool

Converts text to a real date and back. Alteryx dates are yyyy-MM-dd, and anything else is text as far as date arithmetic is concerned.

Specify the incoming format explicitly. 03/04/2024 is ambiguous, and guessing produces silently wrong dates rather than an error — the same trap as every other tool.

Once it is a real date, DateTimeDiff and DateTimeAdd in a Formula tool work as expected.

Which to reach for

  1. 1Simple delimiter — Text to Columns
  2. 2Fixed pattern with parts to extract — RegEx Parse
  3. 3Just removing characters — Data Cleansing, or RegEx Replace
  4. 4Text that should be a date — DateTime
Key points
  • Text to Columns can split to rows, not just columns
  • RegEx Parse with capture groups splits a field into clean columns
  • Specify the incoming date format — guessing fails silently
Check yourself