---
title: REPLACE
description: Learn how to use the REPLACE function to replace characters in a text string within calculated columns, including syntax, parameters, and practical examples for data manipulation.
---
import {  Steps } from '@astrojs/starlight/components';

# REPLACE

The REPLACE function in Infoveave replaces a specified number of characters in a text string with another text string, starting from a specified position.

## Applicable to

Calculated Columns

## Return Value

* The REPLACE function returns a new text string where characters starting from the start position in the text are replaced with the replace text string.
* If chars are greater than the remaining characters in text starting from start, the function replaces all remaining characters.

## Remark

* The REPLACE function is case-sensitive.
* If start is greater than the total length of text, the replaced word will be added to the end of the text.
* If char is greater than the length of text, the whole text will be replaced by the replace text.
* If char is 0, the replace word will be added to the text at the defined position.
* The REPLACE function replaces NULL with the replace text.

## Syntax

```
REPLACE(<expression>,start, chars, replace)
```

## REPLACE in Calculated Columns



| Parameter | Description |
|---|---|
| Expression | A placeholder in a function that is replaced with the actual column name. |
| Column Name | The name of the column in the dataset or Datasource that contains the values you want to analyze. |
| Start | The starting position from which to replace characters. |
| Char | The number of characters to replace. |
| Replace | The text string that will replace the specified number of characters starting from the start position in the text. |

Steps to Use

<Steps>
1. Write the REPLACE function. For instance ```REPLACE(<expression>,start, chars, replace)```
2. Replace the **Column Name** with the actual name of your column required.
3. To learn how to add calculated columns in Infoveave, visit the section [Calculated Columns](/studio-v8/datasources/calculated-columns-datasource/).
</Steps>

> **Example**
> You can use the REPLACE function to replace the first two characters of the text from the `[COUNTRY]` column with "IN", as
> ```
> REPLACE(VALUE([COUNTRY]), 1, 2, "IN")
> ```


