Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Black_Hole
Creator II
Creator II

Count row in two straight tables

Hello all,

I would like to count the number of rows in two tables. The problem is that in these two tables, I have the same key fields (A,B,C).

Table 1: 4 fields

A             B             C             D

Table 2: 3 fields

A             B             C            

Consequently, I don't how can I use the function Count() and avoid a wrong result. 

My purpose is to create a pie chart  representing the number of rows in each table.

Please could you help me.

Thank you in advance for your help.

Labels (1)
2 Replies
dplr-rn
Partner - Master III
Partner - Master III

not 100 % clear why you need 2 tables and what are you counting.
but going with your approach. create a Type field in each table. e.g. Table1 - Type='Table1', Table1 - Type='Table2'
use this type value in set analysis when doing your count
e.g. count({<Type='Table1'>}A)
Black_Hole
Creator II
Creator II
Author

Hello @dplr-rn,

Thank you very much for your solution.

I would like to try it.

Please could you explain how you can create a type field.

Thank you in advance for your help.