Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Stravan
Contributor III
Contributor III

Proportion per group

Hi,

I need to calculate the percentage (percent) within each group A and B, not per Test (which is a cyclic group) but per group, see the picture. How can I calculate % A and % B?

Thank you in advance

Test#A%A#B%B
Test111018%5526%
Test220033%12057%
Test330049%3517%
Total610100%210100%
1 Solution

Accepted Solutions
Stravan
Contributor III
Contributor III
Author

Now the problem has been solved by the formula below:

num(sum(Salary), '###0')/num(sum(TOTAL <Type> Salary), '###0')

 

View solution in original post

3 Replies
Lisa_P
Employee
Employee

See screenshot:
propgrp.PNG

Stravan
Contributor III
Contributor III
Author

Thank you for your replay.

Do I have to count for each column manually? Is there any way to do it right away? The problem is that #A and #B are not their own variables / fields, they are the value of a field called "Type".

 

Here is my table from QlikView, as you can see the percentage is by sex, I want to have a Type?

I don't want the sum of% A-E = 100%, I want% Female +% Male = 100%

Type#A%A#B%B#C%C#D%D#E%E
Sexnum(sum(Salary), '###0') num(sum(Salary), '###0')/num(sum(TOTAL Salary), '###0')num(sum(Salary), '###0') num(sum(Salary), '###0')/num(sum(TOTAL Salary), '###0')num(sum(Salary), '###0') num(sum(Salary), '###0')/num(sum(TOTAL Salary), '###0')num(sum(Salary), '###0') num(sum(Salary), '###0')/num(sum(TOTAL Salary), '###0')num(sum(Salary), '###0') num(sum(Salary), '###0')/num(sum(TOTAL Salary), '###0')
Female8814622%46391%4697812%5567314%172734%
Male3975010%35831%5652614%5862514%332138%
Total 12789632%82222%10350426%11429828%5048712%
Stravan
Contributor III
Contributor III
Author

Now the problem has been solved by the formula below:

num(sum(Salary), '###0')/num(sum(TOTAL <Type> Salary), '###0')