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

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

Count if and Total

Hello everyone,

I have a table which contains an expression like :

count(if(A and B), Compteur)

Instead of the numbers, I would like to display the percentages in line, so divide each column by the total of the line. To do so, I wanted to use "Total" but i don't know how to use it with the "if"...

Count(if(A and B), Compteur)

(Please, I chose an if because I wasn"t able to do a proper set analysis.

Thank you for your help !

2 Replies
marcus_sommer

Try: Count(TOTAL <DIMENSIONS> if(A and B, Compteur))

If you provide more informations someone might help you with transform the if-loop into a set analysis statement.

- Marcus

Qrishna
Master
Master

Hi laura,

specify what the conditions A and B stand for.

Based on that we can write a set expression or an if() expression.

Usually A percentage can be calculated by :

Count(if(A and B), Compteur) / Count(total {$<set conditions >}Compteur) *100 and format the number accordingly


thanks