Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm new to QlikView and have a question about a count function I want to apply to a chart.
I uploaded an example to this post.
I have 2 dimensions which are:
- animal_category
- animal
My expression is: Count(Animal_category).
When I count the animal_category without submitting the animal dimension to the table I get a value of 3.
But when I add the animal dimension I get a value of 1 (because QlikView counts for the combination of added dimensions).
I would like to make an expression (or a different approach) with which I can make a count of animals in the animal_category without it being influenced by the added animals.
Thanks in advance.
Based up o how you want aggregate the TOTAL qualifier on dimension. You can add one more dimension into that TOTAL qualifier like
Count(TOTAL <Animal_category, Animal_attributes> Animal_category)
I wonder, you;ve asked proper question for below
@Strooprover wrote:When I count the animal_category without submitting the animal dimension to the table I get a value of 3.
But when I add the animal dimension I get a value of 1 (because QlikView counts for the combination of added dimensions).
But, as per image - I still see the "animal" dimension also. Perhaps
Count(TOTAL Animal_category)
Hi Anil,
Thank you very much for your quick response.
I've added a new image to show you what I mean.
What I would like to have is a column in where the dimension fish gets a value of 3 and Ants a value of 2 instead of 5.
In other words, the count of animals inside of the animal_category.
If you want Fish as 3 / Ants as 2 instead 5. Perhaps
Count(TOTAL <Animal_category> Animal_category)
That works indeed for the current example.
If I may, I would like to make the example one step more complex.
I gave my fishes attributes.
In the sourcefile you can see how I added them.
This change results in different count values for my expression (QV example 3).
Is it possible to prevent this?
I would like to keep the result for fish 3 instead of 5.
Much thanks in advance!
Based up o how you want aggregate the TOTAL qualifier on dimension. You can add one more dimension into that TOTAL qualifier like
Count(TOTAL <Animal_category, Animal_attributes> Animal_category)
Great.
That's exactly what I needed!
One last question:
Is it possible to filter for such a value?
So, for instance: I want to filter only animal_categories with 3 animals in it (based upon the count column).
You can, TOTAL never stop the filter selection where is Aggregate can be stopped during analyse time.
Your help is much appreciated.
Thank you very much!