Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
aishwarya17
New Contributor II

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
Esteemed Contributor

Re: Dividing a column by the column total

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.

3 Replies

Re: Dividing a column by the column total

Try this

Count(val)/Count(TOTAL val)

OmarBenSalem
Esteemed Contributor

Re: Dividing a column by the column total

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.

Re: Dividing a column by the column total

Sure, sounds like a great idea