Skip to main content
Announcements
Announcing Qlik Talend® Cloud and Qlik Answers™ to accelerate AI adoption! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Take record counts of tables

Hello all,

I have a requirement like below.

In a database I have tables almost 20 and i want to display records count in dashboard.

Like

select count(*) from dim_orders

Result 200

In Qlikview

Orders: 200

like way I have to display for all tables.

Please help me how to proceed on this

Regards

Kumar

23 Replies
Chanty4u
MVP
MVP

Create the Straight table

Dimension: dim_orders

Expression: Count(dim_orders)

tyagishaila
Specialist
Specialist

right click on dashboard

---> Select fields...  --->  Check Show System Fields ---> Select $Rows from system fields.

maxgro
MVP
MVP

there are 2 system fields, $Table and $Rows

1.png

tamilarasu
Champion
Champion

Hi Kumar,

Create a straight table with dimension as $Table and expression as $Rows. Now, you can see record count for all the tables.

Untitled.png

Anonymous
Not applicable
Author

Thanks all for sharing information.

here i am doing validations.

I am generating QVD and I want take record counts to the particular QVD. I want to compare those with data base table record count.

I want to display those two counts in QVW. This(counts should be updated dynamically) should happen for all QVD's and tables dynamically, if data gets refreshed.

Chanty4u
MVP
MVP

hope thsi thread will helps u

RE:after-before

ramasaisaksoft

Hi Kumar,

For finding Tables and Rows count ,Best way is System Table($Table,$Rows).

But here you will not get the correct results as it is Sql command why because in your QVD creation or Data model creation time you are used so many logics(Left join,Right join,Full outer Join...etc) so obviously your records count may be increased or decreased.

So if you want exact count of your records just check each and every table individually with ($Table,$Rows).

MayilVahanan

Hi

Try like this

Let TransactionQVD = QvdNoOfRecords('Transaction.qvd');

LOAD * Inline

[

FileName, records

Transaction.qvd, $(TransactionQVD)

];

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable
Author

Hi,

Thanks Mayil.

In this case, if I have 20 tables I have to declare 20 variable for each table rite?