Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to calculate a percentage of column total?

Having trouble coming up with this simple calculation. i have 40 rows of data with two columns.  Gender and Final rating (4 possible ratings).  I need to calculate the % of females in each rating class as a % of all females (% of column total). Any suggestions?

1,970 females/13,204 total females = 14.9%

6 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

=Count(MeasureName)/Count(TOTAL MeasureName)

Replace MeasureName with the actual field name.

Regards,

jagan.

vishsaggi
Champion III
Champion III

Hello Jim,

Is this you are looking for. PFA the qvw. file. Let us know if any.

Thanks

V.

sibideepak
Creator II
Creator II

Check the Relative option in that expression to get the % value.

Not applicable
Author

Hi,  I still am not able to get this. I can get the % of a cell as a percentage of total population, but not % of only total female or total male.  I don't have a relative button as i am using a pivot chart.  How would i write a definition to identify the sum of all "females" or sum of all "males" to use as the denominator?

So in the chart below, i need the cell for "Above 75% females" to be 1,970/13,204 (all females) which should be 15%

swuehl
MVP
MVP

Try TOTAL qualifier with a field list, like

=count(Gender) / count(Total<Gender> Gender)

Not applicable
Author

that worked!  thank you so much