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: 
andyrebs
Contributor III
Contributor III

Sum of Count

Hi

I have a problem, I know that it is very simple, but it's Friday and I can't get out of this little trouble.

I know the Count function, what is the correct expression to have the total of counts. To be more clear I would like to have a percentage (count(field)/sum of count(field). The field is a text field

Thanks again.

Andrea

1 Solution

Accepted Solutions
swuehl
MVP
MVP

I assume you are using this expression in a chart object with a dimension.

To disregard the current line dimension value, you can add TOTAL qualifier to your count() function

=count(field) / count(TOTAL field)

TOTAL qualifier can also be used with field list, like TOTAL<DIM1,DIM2>, see the Help for more detail.

View solution in original post

4 Replies
swuehl
MVP
MVP

I assume you are using this expression in a chart object with a dimension.

To disregard the current line dimension value, you can add TOTAL qualifier to your count() function

=count(field) / count(TOTAL field)

TOTAL qualifier can also be used with field list, like TOTAL<DIM1,DIM2>, see the Help for more detail.

andyrebs
Contributor III
Contributor III
Author

I knew it was simple, I forgot TOTAL.

I use this expression in a list box, if it is possible I would like to transform the expression in a bar chart, do you know how I can set it.

Anyway Thank you.

Andrea

swuehl
MVP
MVP

Well, if you are using field as field in your listbox and above expression, I would just try field as dimension in a bar chart and the above expression as expression.

andyrebs
Contributor III
Contributor III
Author

Thank you, I will check.