Copy Column Values

The Copy Column Values task copies values from a given column to a new Column.

When to use

  • To create a backup of a column’s values.

  • To copy values from one column into another.

  • To copy values from a column based on a criterion.

Quick Start

Let us start with the following sample data:

Table 21 Birthdays → View 1

Student

Science

English

French

Alice

140

138

Bob

135

145

Frank

122

102

Judy

185

135

In this sample data, it is evident that the student takes only one of the two language subjects. Our goal is to consolidate the values of English and French columns into a new column named Language

Table 22 Birthdays → View 1

Student

Science

English

French

Language

Alice

140

138

138

Bob

135

145

145

Frank

122

102

102

Judy

185

135

135

Following are the steps to achieve our goal:

  1. Go to Transform > Column Functions.

  2. Select the Copy Column Values function.

  3. Choose the column English and add a condition that says English has Non Empty Values

  4. Enter Language in the new column and hit APPLY. This will create a new column called Language and fill in the values from column English into column language wheresoever it has a value

  5. Open Data Preparation menu and click on Column Function

  6. Select Copy Column Values

  7. Choose the language French and add a condition that says French has Non Empty Values

  8. Select the column Language in result section and hit APPLY

Note: English and French can be removed by deleting columns

The resulting data should now look like below:

Table 23 Birthdays → View 1

Student

Science

Language

Alice

140

138

Bob

135

145

Frank

122

102

Judy

185

135

Supported Options

This task takes the following inputs:

  • Copy from: The column from which you want to copy values from.

  • Condition: See Condition

  • Apply result into: This option allows configuration of the destination of the results by this task. See result documentation.

Note

You can copy a numeric column or a date column as a text column. This will set the format on the date/numeric columns to as seen currently on the grid. It cannot be edited later and will not reflect even if you change the format.

See also

Result Column

The result column documentation

Number Formatting

The numeric formatter documentation

Date Formatting

The date formatter documentation