Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
peter_turner
Partner - Specialist
Partner - Specialist

How to get a simple count of rows in a table

Hello Everyone,

I'm trying to find a simple way to make my table title show the number of rows in the current selection.

Usually I just count one of my ID fields such as count(MY_ID), but I'm looking if there is a built in function I can use instead?
Similar to the "Sum of Rows" feature for an expression, just need a simple count of the number of rows that are shown on screen.

Does QV have a built in function for this sort of thing or anyone have any ideas?
The dataset is large with 6million+rows.


Thanks,
Peter.



30 Replies
Not applicable

I've tried Count(distinct dim1 & dim2 & dim3 ) but i haven't the good result.

I think qlikview does'nt count rows with null values...

for exemple if i have :

Dim 1           |     Dim 2               |      Col1          |     Col2   

Libelle 1          CodeLibelle 1          12 €                21€

Libelle 2          CodeLibelle2           24€                21€

Libelle 3          CodeLibelle3           --                      --

When i use :

Count (distinct Dim1 & Dim2)

--> my result is 2 BUT I would like 3 ! I have 3 rows...not 2

Not applicable

Strange things can happen when you have null values.  Have you tried replacing your nulls values with zeroes?  Something like:

IF(ISNULL(YourExpression)=0,YourExpression,0)

Not applicable

thanks for your help but in fact my problem wasn't exactly the same

i found the good result but with set analysis because i had parameters and active selections...

suniljain
Master
Master

RowNo(Total)

SunilChauhan
Champion
Champion

use below code in scrpt

let noofrows=NoOfRows('Tablename');

Sunil Chauhan
Not applicable

Did you find a solution to this? Please share. Thanks.

rajat2392
Partner - Creator III
Partner - Creator III

you can simply use count function.

=Count(Dimension)

here dimension is simply the dimension you are using in straight table..and if you are using more than one dimension, so write first dimension name there.

Not applicable

Hi,

just add a new fied on your sheet, edit the field and fill the expression :

=Sum([count(THEFIELDYOUWANT)])

You can add a distinct if it matters.

Anonymous
Not applicable

For me, this tip was the one that worked.

All the other tips like RowNo() and others bring me a "1" result.

I made this test on caption of my object.

rajasekhar6067
Contributor II
Contributor II

Please share the solution that you have implemented for this.

Many Thanks!!