Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

RowNo() behaviour

Hi experts,

I have not used RowNo() function often but what I believed that it just marks the number of rows in a load statement. i have a very basic example as shown below. What I am not understanding here is why RowNo() is reset when Year value is changed. I am wondering how RowNo() function's behavior is dependent on the dimensions in a straight table.

RowNO().PNG

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Just have a look at the HELP, rowno() can be used in the script as well as in charts, but there are subtle differences.

From the HELP, for rowno() chart function:

If the chart is one-dimensional or if the qualifier total is used as argument, the current column segment is always equal to the entire column.

If the table or table equivalent has multiple vertical dimensions, the current column segment will include only rows with the same values as the current row in all dimension columns except for the column showing the last dimension in the inter field sort order.

Also have a look at the examples in the HELP for rowno() / chart inter record functions.

For the script function rowno(), there are no columns segments, so it's just creating a consecutive row index.

See also

Counters in the Load

View solution in original post

5 Replies
swuehl
MVP
MVP

Here, rowno() is a chart function.

I think you are mixing it up with the script function Rowno().

Anonymous
Not applicable
Author

Hi Swuehl,

Thanks for the response.

I have used this as a chart function(expression) only and in my script, I have an inline table with 3 fields Year and Month and Sales.

It would be great if you could please elaborate.

swuehl
MVP
MVP

Just have a look at the HELP, rowno() can be used in the script as well as in charts, but there are subtle differences.

From the HELP, for rowno() chart function:

If the chart is one-dimensional or if the qualifier total is used as argument, the current column segment is always equal to the entire column.

If the table or table equivalent has multiple vertical dimensions, the current column segment will include only rows with the same values as the current row in all dimension columns except for the column showing the last dimension in the inter field sort order.

Also have a look at the examples in the HELP for rowno() / chart inter record functions.

For the script function rowno(), there are no columns segments, so it's just creating a consecutive row index.

See also

Counters in the Load

Clever_Anjos
Employee
Employee

Rowno() at script level brings the record number

Rowno() at graph level brings:

  • the line number inside the first dimension
  • the global line number, when you use TOTAL qualifier
Anonymous
Not applicable
Author

Thank you very much swuehl for the response. Understood.