1 Reply Latest reply on Jan 8, 2019 1:48 PM by Diego Parker

    Using % on Population Pyramids

    Dave Baylis

      Hi all,


      I have a slightly annoying problem that I can't seem to get my head around.


      Unfortunately its NHS data so I can't upload but hopefully I can explain my issue.


      I've created a population pyramid based on gender and age group. In my dataset I have 'Age Band' and 'Gender' so have created 2 calculations (IF Gender = 'Male' then -Headcount End) and similar for Female.


      This works fine and I can add the Headcount figure in with no issues.


      However what I'd like to do is add the % for each of the segments that I've created.


      I can't use a quick calculation as I now have 2 measure and I've tried using Female Headcount / Fixed Headcount but that doesn't seem to work either.


      Happy to fabricate a Pyramid and upload if that would help.


      I can't help but feel I'm missing something really obvious here but would appreciate any assistance.





        • 1. Re: Using % on Population Pyramids
          Diego Parker

          Hey Dave,


          To clarify, what percentage you would like to calculate?


          1) The percentage of each gender across an individual age segment?  For example, in the 20-24 age range there are 60% female and 40% male.

          2) The percentage of of an age segment and single gender in relation to the rest of the data? For example, women in the 20-24 age range correspond to 10% of all the entries.


          I tried to address these questions in the following workbook. There are two worksheets, one for each case.


          Whilst this problem may seem simple, you have to use Table Calculations and/or LODs to get the desired results, which is something you start learning in Tableau Intermediate. If you have any questions, do not hesitate on asking.


          Keep the hard work!