Data Cleansing Tool Icon

Data Cleansing Tool

Last modified: July 08, 2021

One Tool Example

Data Cleansing has a One Tool Example. Visit Sample Workflows to learn how to access this and many other examples directly in Alteryx Designer.

Use Data Cleansing to fix common data quality issues. You can replace null values, remove punctuation, modify capitalization, and more!

Known Limitations

The Data Cleansing tool is not dynamic. If used in a dynamic setting, for example, a macro intended to work with newly generated field names, the tool will not interact with the fields, even if all options are selected. Consider replacing the Data Cleansing tool with a Multi-Field Formula tool.

Numbers with more than 15 digits need to be treated as strings, or they lose precision. Set the field type to a string with the Select tool.

Visit the Alteryx Community Tool Mastery series to learn even more about this and other tools.

Tool Components

Image showing the Data Cleansing Tool icon with one input anchor and one output anchor.

The Data Cleansing tool has 2 anchors.

  • Input anchor: Use the input anchor to connect the data you want to cleanse.
  • Output anchor: The output anchor outputs the cleansed data.

Configure the Tool

Use the Options tab to determine how data quality issues are managed.

Remove Null Data

Use these options to remove entire rows and columns of null data.

  • Remove Null Rows
    • Removes all rows with a null value in every column.
    • Removes rows with null values—does not remove rows with empty string values.
    • Only removes rows that have a null value in every column.
    • A message displays in the Results window with the number of rows that were removed.
  • Remove Null Columns
    • Removes all columns with a null value in every row.
    • Removes columns with null values—does not remove columns with empty string values.
    • Only removes columns that have a null value in every row.
    • A message displays in the Results window with the number of columns that were removed

Select Fields to Cleanse

Select the fields to cleanse with the configuration options below. Use the All link to select all fields and use the None link to deselect all fields.

String Data Types

All options, except for Replace Nulls with 0, apply to string data types. To specify different options for different fields, use multiple Data Cleansing tools in your workflow.

Replace Nulls

To replace nulls with values other than blanks or 0, use the Imputation tool.

  • Replace with Blanks (String Fields): Replace null values with a blank string value. A blank registers as " " rather than [Null]. This option is selected by default.
  • Replace with 0 (Numeric Fields): Replace null values with a 0 (zero). This option is selected by default.

Remove Unwanted Characters

  • Leading and Trailing Whitespace: Removes leading and trailing whitespace. This option is selected by default.
  • Tabs, Line Breaks, and Duplicate Whitespace: Replaces any occurrence of whitespace with a single space, including line endings, tabs, multiple spaces, and other consecutive whitespaces.
  • All Whitespace: Removes any occurrence of whitespace.
  • Letters: Removes all letters, including non-Latin alphabet letters like A b Z À é ö.
  • Numbers: Removes all numbers.
  • Punctuation: Removes these characters:
    ! " # $ % & ' ( ) * + , \ - . / : ; < = > ? @ [ / ] ^ _ ` { | } ~

Modify Case

Select Modify Case and then choose an option from the dropdown to change the capitalization of string data types:

  • Upper Case: Capitalizes all letters in a string.
  • Lower Case: Converts all letters in a string to lowercase.
  • Title Case: Capitalizes the first letter of all words in a string.
Was This Page Helpful?

Running into problems or issues with your Alteryx product? Visit the Alteryx Community or contact support. Can't submit this form? Email us.