3 Replies Latest reply on Dec 12, 2012 12:23 PM by Jonathan Drummey

    Counting populations by defined groups and display output as histogram

    Jonathan Capper

      I have cumulative data for a list of individuals. How do I create groups and get a count for the population within each group and then get Tableau to produce a histogram displaying the distribution of the population? Ideally would compare previous year distribution with current year and also have a dynamic formula to define the size of the group depending on how far through the year you are, i.e. in month 2 you might split population into 10 hour groups, whereas in month 8 you might want it to be in 40 hour groups.


      The attached file shows from data to graphical output the process in Excel that I am trying to get Tableau to perform. The data that the query would extract is in columns B, C & D. B would be the ID of the population and C & D are the values for 2 years 2011 and 2012. The formula in columns G & H converts by rounding up the values into "buckets" defined in size by the value in in H1.


      The Max and Min in G3:H4 show the range of the data in the population and is used to set the range of the Graph data table in J8:L17. The formula in columns K & L is a count of the number of instances of the individual group values in columns G & H. The graph is a histogram of the Graph data table.