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: 
Not applicable

Problem with Count

Dears,

I'm using an expression to count how many times the word "Alto" appears in my collumn "H1".
For this, I'm using the follow expression:

=Alta: ' & round(Count({$<[H1] = {'Alto'}>} [H1])/count(Company) * 100,0.01) & ' %'

And it's working perfectly,

But when I try to do the same thing, in order to count how many times the word "Alto" appears in the collumn "H2" it is working wrong.

The expression that I'm using is:

=Alta: ' & round(Count({$<[H2] = {'Alto'}>} [H2])/count(Company) * 100,0.01) & ' %'

The value of (Count({$<[H2] = {'Alto'}>} [H2])) is supposed to be 19, but It's giving me the result of 9. and the same thing is happening with the collumn H3.

Insted of show me the value of 13 in the collumn H3, it is showing me the value og 9, exactly the same as the H2.
What is going on?

Can you help me?

Thanks for your attention,

Best regards

2 Replies
pat_agen
Specialist
Specialist

hi,

maybe you have something selected in your document which is causing this.

The dollar sign $ that you have as the first sign in your set identifier is telling qlikview to apply the current selections. remove this and see if your results are different.

patricio
Contributor III
Contributor III

You can use the following expression with H1= and H2= .

This way your count in H2 is not depending in your H1 and H3 selections:

round(Count({$<[H2] = {'Alto'}, H1=, H3=>} [H2]))