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

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Dividing a column by the column total

Hi,

Can someone please tell me the expression for Col 3?


Col 1Col 2Col 3
Namecount(val)count(val)/Total(count(val))
A22/14 = 0.14
B33/14 = 0.21
C55/14 = 0.35
D44/14 = 0.28
TOTAL14

Thanks

1 Solution

Accepted Solutions
OmarBenSalem
Partner - Champion II
Partner - Champion II

I'd say count(val)/count({<Name=>}total val), with that, even he filter with a name, he'll always get the correct value for the pourcentage in column 3.

If he doesn't do so, he'll get 100% when he select Name=A for example.

View solution in original post

3 Replies
sunny_talwar
MVP
MVP

Try this

Count(val)/Count(TOTAL val)

OmarBenSalem
Partner - Champion II
Partner - Champion II

I'd say count(val)/count({<Name=>}total val), with that, even he filter with a name, he'll always get the correct value for the pourcentage in column 3.

If he doesn't do so, he'll get 100% when he select Name=A for example.

sunny_talwar
MVP
MVP

Sure, sounds like a great idea