Details on Replace Specific Value


The best way to replace a value is by double-clicking on the value in a table visualization and changing to a new value. See Replacing a Value for more information.

This dialog is used when you edit a previously added transformation from the Data canvas. However, it can also be used if you must add a replace value transformation to an earlier stage in the data table history (not to the final data table).

To add a Replace Specific Value transformation when adding a data table:

  1. On the authoring bar, click Files and data .

  2. In the Files and data flyout, locate the data of interest by searching for a suitable keyword or by browsing the different categories.

  3. Tip: You can also apply transformations when you replace a data table and when you add columns or rows to an already existing data table.

  4. In the Add data to analysis summary, click on the new data to expand the settings section, and click Transform data.

  5. In the Transform data dialog, select Replace Specific Value from the drop-down list and click Insert.

  6. Click OK to close all dialogs and to add the data.

To add a Replace Specific Value transformation to data that is already loaded into Spotfire:

  1. Select Data > Transform data....

  2. In the Data table drop-down list, select the data table you want to add the transformation to.

  3. Select Replace Specific Value from the drop-down list and click Add....

To add transformations to a specific node in the source view:

  1. In the Data canvas, click on the node where you want to add a transformation.

  2. Response: Details about the selected node are shown in the lower left part of the source view.

  3. In the list of steps for the selected node, click on the plus sign where you want to add a new transformation (or transformation group).

  4. In the Transform data dialog, select Replace Specific Value from the drop-down list and click Insert.

  5. Click OK.

Option

Description

In column

Select the column in which a value should be replaced.

For example, if you have noticed that there is a misspelled value in the column 'Month', you select that column here.

Previous value

Type the value that you want to replace.

For example, if 'April' has been misspelled to 'Aprill', you type the misspelled value here (Aprill).

Value after formatting

[Only applicable for values of a data type that can be formatted in different ways. For example, a Date, or a Real value.]

Shows the way the value is displayed in the analysis using the current formatting.

Replace value with

Type the new value instead of the previous value.

For example, if 'April' has been misspelled to 'Aprill', you type the correctly spelled value here (April).

Value after formatting

[Only applicable for values of a data type that can be formatted in different ways. For example, a Date, or a Real value.]

Shows the way the value is displayed in the analysis using the current formatting.

Identify row by

Lists the currently defined key columns to use to uniquely identify the row.

If no key columns have been defined, click the arrow to expand the section and define key columns.

   Key column

Lists the name of all key columns that have been defined so far.

   Value

Shows the value of the key column on which to replace the specific value.

For example, if you have an ID column containing different ID numbers, and you want to replace the value for the ID 'TM20176', then you type this ID value here.

Click on the plus sign to add another column as a key column, which can be used to uniquely identify the row value that should be replaced.

Warn if more than one value is replaced

Select the check box to get an error message in the data canvas if the specified key columns do not uniquely identify the row and more than one value is replaced by this transformation.

For example, if you have specified unique keys and a reload of the data has modified the available rows, so that the keys are no longer unique, then you may want to be informed about this.

Clear the check box if you do not care about how many values are replaced, or, if you want to replace all values in a column matching a certain value in the key column. For example, you can use this transformation to replace the last name on all rows matching a certain Social Security Number.

However, if you want to replace all instances of a value in a column, you might want to use the more general Replace value transformation instead.

See also:

Transforming Data

Editing Transformations