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
About this task
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