Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show the row number of a table in a text box

Good morning, I would write in a text box ne number of line that I have in a table.

The number of lines that I have in the table depends on the selections made via the list boxes on the worksheet.

The table that I use is a simple table.

It contains only dimensions and no expressions.

Can someone help me ?


17 Replies

May be just Count(DimensionName) in a text box object?

Creator III
Creator III


Count() using one of the fields used in the table should help you.




The number of rows in a Table Box, Straight Table or Pivot Table:

=Count( UniqueID )        // Varies with selections

=Count( {1} UniqueID )  // is the total number of rows as if no selections was made

It is important that you select a field in the table that is unique or you will get a wrong count.

The number of rows in an in-memory TABLE in the data model:

This will give you the exact count of rows irrespective of any selections. If you need it to change according to selections go with the first approach.

You actually have some System fields ‒ (QlikView) that will be of help answering the kind of questions you have. They start with a $ and belongs to the same unnamed and unassociated table:

$Table, $Field, $Fields, $FieldNo, $Rows

So by using a set expression to select the table and $Rows as the field that contains the value you can use this expression:

=Only( {<[$Table]={'TableName'}>} [$Rows] )

That picks the actual rowcount of a particular table accurately

Not applicable

Thanks Peter, I've tried your solution but don't works.

Can you explain me the solution that you wrote?

I've tried to us the espression theat you write but I obtain nothing

Not applicable

Hi Matus, thanks but don't works. I've a table with only dimnsion loaded from a sql query.

Yhe espression that you writ me don't work.

Not applicable

Thans Sunny T, but your response doesn't work.

The result is that in the table box there is always displaied the same result even if they select the values that limit the number of rows in the table.

Creator III
Creator III

Can you post an exaple - table data and the expected outcome?


If you have say dimensions A, B and C (field names), then try

=Count(DISTINCT A & B & C)

Not applicable

Hi Matus, I have the table like this, a simple table with only dimension:

I have in the sheet a lot of selector that could change the number of row in the table.The selector have fields that are not present in the table.

I would have a text box where I know the number of rows in the table after the use of selector.