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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Percentage Distribution

Hey Guys,

i have an additional problem and hope that some of you can help me.

I need a percentage distribution per gender for some values.

For example:

Our customers could specify her gender and their education level.

User                   Gender              Education Level (Bildung)

1                            f                            MSA

2                            f                            Abitur

3                            m                          MSA

4                            m                          Abitur

5                            m                          MSA

Amount of 5 Users (2 female, 3 male) thereof 3 with education level "MSA" and 2 with "Abitur".

There is no problem to create a chart like this (absolute values of the user):

mail1.jpg

If i turn on "relative" in the chart properties..

Mail4.jpg


.. the first chart changes in the following way:

mail2.jpg


QlikView calculates as follows: 1 female with "MSA" divided by all persons (2 females & 3 males) = 20 %

But i need a chart, that calculates as follows: 1 female with "MSA" divided by all females (2 females) = 50 %

This calculation shows the gender intern distribution, and the chart should look like this:

mail3.jpg

Anyone who has an idea?

(All pictures created with paint)

Many thanks in advance!


1 Solution

Accepted Solutions
SunilChauhan
Champion II
Champion II

use expression

Count ( if(Gener='F',User))/ Count (Total<Gender>User)-> in first expression

Count ( if(Gener='M',User))/ Count (Total<Gender>User) in second expression

check relative in both expression

Sunil Chauhan

View solution in original post

3 Replies
Not applicable
Author

Hi,

Please use the below formula to calculate % instead of Relative option.

Count(User)/Count(Total<Gender> User)

1.JPG

SunilChauhan
Champion II
Champion II

use expression

Count ( if(Gener='F',User))/ Count (Total<Gender>User)-> in first expression

Count ( if(Gener='M',User))/ Count (Total<Gender>User) in second expression

check relative in both expression

Sunil Chauhan
Not applicable
Author

Thank you both! It works! 🙂