# NoOfRows

NoOfRows() returns the number of rows in the current column segment in a table. For bitmap charts, NoOfRows() returns the number of rows in the chart's straight table equivalent.

Information noteSorting on y-values in charts or sorting by expression columns in tables is not allowed when this chart function is used in any of the chart's expressions. These sort alternatives are therefore automatically disabled. When you use this chart function in a visualization or table, the sorting of the visualization will revert back to the sorted input to this function.

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.

Syntax:

NoOfRows([TOTAL])

Return data type: integer

Arguments:

* TOTAL: If the table is one-dimensional or if the qualifier TOTAL is used as argument, the current column segment is always equal to the entire column.

  [Defining the aggregation scope](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/define-aggregation-scope.htm)

Example:

`if( RowNo( 
 )= NoOfRows( ), 0, Above( sum( Sales )))`

## Learn more

* [RowNo](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/InterRecordFunctions/rowno.htm)