Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sunilkumarqv
Specialist II
Specialist II

Diff b/w Count and RowNo?

Hi ,

  can any one tell diff b/w count and rowno .I have emp table used in straight table one dimension as ID and exp. as rowno(total),

total rows is showing 150 not matching the data in my database .if i use count(ID) its matching .Can anyone brief these to me please.

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Please check enclosed file...

Hope this helps.

View solution in original post

5 Replies
hic
Former Employee
Former Employee

These two functions are very different.

Count() is an aggregation function, i.e. it counts the number of records associated with a dimensional value. It can be used as expression in a chart or as function in the load script if you have a "Group By". It takes many records as input and returns one number as output.

RowNo() is a scalar function, and counts the number of records as output from a Load statement.

HIC

sunilkumarqv
Specialist II
Specialist II
Author

thanks  Henric  . Can explore it with some examples ?

hic
Former Employee
Former Employee

I suggest you make your own example. For instance, if you use the following script:

   Load

      RowNo() as ID,

      Pick(Ceil(3*Rand()),'A','B','C') as Dim

      Autogenerate 100 ;

you will be able to see a lot. Create a pivot table with Dim as dimension and Count(ID) as expression. Further, add RowNo() as second expression. Now the difference should be obvious.

HIC

MK_QSL
MVP
MVP

Please check enclosed file...

Hope this helps.

sunilkumarqv
Specialist II
Specialist II
Author

Thanks manish and Henric realy i learn't somthing new .