Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
soniasweety
Master
Master

Count each table rows

Hi all,

i want to know  the  each table distinct  count of rows   in text object  

how can i do this?

Thanks

Sony

1 Solution

Accepted Solutions
sunny_talwar

This is a script function which can be used to create a variable to store the row count of each table and then displayed in the text box object on the front end

LET vNoOfRowsTable1 = NoOfRows('Table1');

and then display this in the text box object

View solution in original post

8 Replies
sunny_talwar

May be do a distinct count of the unique identifier from each table... make sure that this field is not a key field which connects two tables...

soniasweety
Master
Master
Author

but  what is  =Numofrows  function gives?

and how to use that?

sunny_talwar

I believe it gives the number of rows in a particular chart when used on the front end... read here

https://help.qlik.com/en-US/qlikview/12.1/Subsystems/Client/Content/ChartFunctions/InterRecordFuncti...

sunny_talwar

This is a script function which can be used to create a variable to store the row count of each table and then displayed in the text box object on the front end

LET vNoOfRowsTable1 = NoOfRows('Table1');

and then display this in the text box object

soniasweety
Master
Master
Author

Okay thanks sunny

can  i use this in text object like this?

=$(NoOfrows)    ?  is this correct?

sunny_talwar

Well depending on your variable... you can do this vNoOfRowsTable1 or $(vNoOfRowsTable1)... one of the two should work....

soniasweety
Master
Master
Author

thanks worked