Guia do Usuário do Cliente Web Spotfire®

Replacing a value

If you find that a value in your data table is misspelled, or, if one value has been entered on a different form than the other values in the column, you can replace that value directly from a table visualization, from the Details-on-Demand, or from the column overview in the expanded Data in analysis flyout.

Before you begin

Imported data (not in-database data) must be loaded in the analysis and the analysis must be in Editing mode.

About this task

In a table visualization, in the Details-on-Demand, or in the expanded data in analysis flyout, double-click on the value you want to replace and type a new value.

Note: These steps are used to replace a few values in a column only, not to change the formatting of a column or to replace an entire data table. If you want to combine several different categories into one, you might want to use Group from marked categories instead.

The change is applied as a transformation and does not affect the source data. For details about the different options, see the corresponding section.

Details

The underlying mechanism behind the Replace Value shortcut is a transformation. If you want to include some type of replaced value in a script, or when using the API to create custom tools, you can add similar transformations by using an expression.

For example, if [PK] is a column which uniquely identifies rows (that is, a primary key column) and you want to replace the specific value 'a' with 'b' on the row where [PK] is 34, you can write the following expression:

case
  when [PK] = 34 and [Col] = 'a' then 'b'
  else [Col]
end

To replace all occurrences of  'a' with 'b' in [Col], write:

case
  when [Col] = 'a' then 'b'
  else [Col]
end