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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating a bar chart

Hi,

My data looks like

County, Gender, email

UK,M,xyz@hotmail.com

UK,M,abc@hotmail.com

US,F,cvb@hotmail.com

etc

I need to be able to produce a bar chart which shows , for each County, the % of each Gender within that Country and each countries total needs to be 100%

error loading image

I cannot work out what the Expression should be to calculate this - please help.

1 Reply
Not applicable
Author

Since the genders are set at only two choices, I would simply use the Country as the dimension and use Set Analysis to create expressions for each gender.

Here's one expression:

Count({<Gender = {"M"}>}email)/Count(email)


That will get you count of males over the entire count (both for the respective country). You have to set the chart to stacked and I also set a static max on the axis to 1.