Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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

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

Try this

Count(val)/Count(TOTAL val)

OmarBenSalem

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

Sure, sounds like a great idea