7 Replies Latest reply on Oct 26, 2011 11:38 AM by Richard Leeke

    Equal Sized Bins / Binning by Quantiles

    JueYan Zhang

      I understand that Tableau can create bins of equal width from measures. I am trying to create bins of equal frequency. In particular, I am looking to create quintile and decile bins so that I can look at data with potentially different scales.

       

      For example, in the attached tableau sheet, I am looking at the relationship of startup capex and sales growth across urban and rural firms. I have two problems. First, because rural firms incur less capex, I only get three groups instead of the five I desire. Second, one of the categories only includes one firm, which throws off the fairly clean relationship that greater initial capex generates greater sales growth. If I were able to implement quantiles, I would have the same descriptive power across panels (ie 5 lines), and avoid sparsely populated bins.

       

      Is there any way in which I can generate these quantiles in Tableau? My data sources don’t sit on Oracle databases, so I can’t use ntile functions. I have numerous dimensions I would eventually like to partition on, and my data will evolve over time, so I don’t want to just hard code the quantile, as I have in my data excerpt.

       

      I have enclosed a sample of my data. I would like to create the “Growth Trajectories Desired” chart. So far, what I can do is in the “Growth Trajectories” chart.

       

      I’ve taken a look at “Manually Choosing the Number of Bins” at http://www.tableausoftware.com/support/knowledge-base/numberofbins

      and Richard Leeke’s excellent “Table Calculation: Quantile (version 2)” at http://www.tableausoftware.com/support/forum/topic/table-calculation-quantile-version-2 but have not been able to accomplish what I’m looking for.

       

      Thanks so much for your help.

       

      JueYan