1 Reply Latest reply: Nov 5, 2009 5:42 PM by Neil Miller RSS

    Creating a bar chart

    dcroft

      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.

        • Creating a bar chart
          Neil Miller

          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.