---
title: ROWNUMBER
description: Learn how to use the ROWNUMBER function to assign unique row numbers in datasets, aiding in data analysis, sorting, filtering.
---
import { Steps } from '@astrojs/starlight/components';

# ROWNUMBER

The ROWNUMBER function in Infoveave returns the row number of a specified expression in a dataset. It assigns a unique number to each row, starting from 1 for the first row and incrementing by 1 for each subsequent row.

## Applicable to

Calculated Columns

## Return Value

 The ROWNUMBER function returns an integer that represents the position of each row in the dataset.

## Remark

* The ROWNUMBER function is useful for creating unique identifiers for each row in your dataset, which can be helpful for referencing individual entries.
* It is often used in conjunction with other functions to facilitate data analysis and manipulation, such as sorting, filtering, and aggregating data.

## Syntax

```
ROWNUMBER(<expression>)
```

## ROWNUMBER in Calculated Columns



| Expression | A placeholder in a function that is replaced with the column names. |
|---|---|
| Column Name | The name of the column in the dataset or Datasource that contains the values you want to analyze. |



Steps to Use

<Steps>
1. Write the ROWNUMBER function. For instance ```ROWNUMBER(<expression>)```
2. Replace `<expression>` with `[Column Name]`.Replace **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**

If you have a dataset with sales data and you want to add a row number to each entry, you would use the ROWNUMBER function as follows

```
ROWNUMBER([Priority])
```

The calculated column will add row numbers starting at 1 for the first row and increasing by 1 for each subsequent row.


