The ROWNUMBERX function is an extension of the ROWNUMBER function that allows you to assign row numbers based on a specified condition
Applicable to
Calculated Columns
Return Value
The return value of the ROWNUMBERX function in Infoveave is an integer that represents the position of each row in the dataset that meets the specified condition.
Remark
The ROWNUMBERX function returns an integer that represents the row number for rows that meet the specified condition.
If any rows do not meet the condition, the ROWNUMBERX function will assign the previous row numbers and continues until the condition is met.
If the first row does not meet the condition, the ROWNUMBERX function will assign 0 to the first row and continues until the condition is met. Once the condition is met the ROWNUMBERX function will assign 1 to the row number.
Syntax
ROWNUMBERX(<expression>,condition)
ROWNUMBERX in Calculated Columns
Parameter
Description
Expression
A placeholder in a function that is replaced with the column names.
Condition
A placeholder in a function that is replaced with the condition filter.
Column Name
The name of the column in the dataset or Datasource that contains the values you want to analyze.
Filter Condition
A filter condition returns the data points that meet the defined condition that you want to analyze. The filter condition can be either a string or a numeric.
Steps to Use
Write the ROWNUMBERX function. For instance ROWNUMBERX(<expression>,<condition>)
Replace <expression> with required [Column Name] and <condition> equals [Column Name]="Filter Condition"
Replace Column Name with the actual name of your column and Filter Condition with the required condition to be applied on the columns.
To learn how to add calculated columns in Infoveave, visit the section Calculated Columns under Sources.
Example
If you have a dataset with sales data and you want to add a row number to each entry where the sales channel is “Online”, you would use the ROWNUMBER function as follows