This article describes how to use the Row Number analytic function in Arcadia Instant.
We are using the Basic Visual for Single Values to demonstrate how to use the Row Number analytic function.
Click a field on the dimension shelf. In this case, choose the population
field.
In the Field Properties menu, select Duplicate.
Click the second population
field.
In Field Properties, expand Analytic Functions, and select Row Number.
In the Analytic Function: Row Number modal window,
Under Select the sort order, you can specify the order of sorting. This order specifies what the row is, and the row where the value is taken. If your visual already specifies sorting order, these values appear in the modal.
You can add additional sort parameters, by clicking the (add/plus) icon.
Here, leave the default order: life expectancy descending, followed by country and GDP, both ascending.
[Optional] If you examine the expression in the Enter/Edit Expression interface, it shows that the function has the following form:
ROW_NUMBER() over ( order by [life_expectancy], [country], [gdp_per_capita]*[population]) as 'row number'
Click Refresh Visual.
Notice that initially, the row number numbers are descending, following the order of the primary sorting column, life expectancy. If you sort the table on another column, such as population, the row number numbers appear disordered.