Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Totoal Count

Hi, New to the QlikView. I have a Statistical box with total count. When I count any fields it is ok, but not the field that participates in the table linkage such as id. The count is shows as "n/a"

Any suggestions? Thank you. Yury.

6 Replies
Not applicable
Author

Hi,

Plz share sample data or QV file.

Not applicable
Author

you can use count function...

suniljain
Master
Master

Pls Post QV file . Because your above description is not enough to understand situation.

Not applicable
Author

I can not post the file, I found some work around: just query another id from the database and alias it as something that does not make the field linked to anything. In that case the id that participates in linkage to other tables does not participate as a count argument. Still do not understand why it does not worked on the first place.

Not applicable
Author

as you say, you cannot count over a field that is a key too between several tables.

You need to create another field from the original using alias, e.g. Id as Counter_Id

As the original field is a key, if you count over it, you could get the count or frecuency from all the tables that have that field, and that count is not real

johnw
Champion III
Champion III


ypritzke wrote:Still do not understand why it does not worked on the first place.


How could it work? You might have 500 IDs in one of the tables, and only 100 IDs in the other. So which number do you want? QlikView doesn't know. So I guess in a statistics box, it represents this confusion with 'n/a'.

If you want to stick with a statistics box, you can create a duplicate of the ID field with a different name in the table you DO want to count, and then count that duplicate ID instead of the linking ID. Ah, which is exactly what Fabián just said, and what you just said worked as a workaround. So yeah, what you both said.

If you're willing to go with a text box or chart, you can use count(distinct ID) to get the distinct values of the ID, assuming that is what you are after. I don't personally use statistics boxes, so that's the approach I'd personally use.