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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Counting number of records

I like others in the forum am very new to Qlikview. I have started an app that has two tables with a join on a common field. I want to create a chart that counts the number of records (grouped by entry type) from the key field of the first table using another field from the second table as the X axis.

Table 1 (detail table)                              Table 2 (static table used to supply description field)

Code (key field)                                     Code (key field)

                                                            Code decscription (X axis)

I do not know how to specify that I want the count to look at Table 1 data only. Right now it seems to mix the two tables data.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Counting a key field is not a good idea, unless you add the DISTINCT qualifier (and then it will still not count only table1 values).

But you can create a copy of your key field in Table1 and count this one:

LOAD

Code,

Code as CodeCount,

...

FROM YourDetailTable;

Then use Code description as dimension and count(CodeCount) as expression.

View solution in original post

7 Replies
swuehl
MVP
MVP

Counting a key field is not a good idea, unless you add the DISTINCT qualifier (and then it will still not count only table1 values).

But you can create a copy of your key field in Table1 and count this one:

LOAD

Code,

Code as CodeCount,

...

FROM YourDetailTable;

Then use Code description as dimension and count(CodeCount) as expression.

Not applicable
Author

Thanks for the prompt response. Works perfectly.

Not applicable
Author

Thanks for the prompt response. Works perfectly.

Not applicable
Author

Thanks for the prompt response. Works perfectly.

Not applicable
Author

Thanks for the prompt response. Works perfectly.

Not applicable
Author

Thanks for the prompt response. Works perfectly.

Not applicable
Author

Thanks for the prompt response. Works perfectly.