4 Replies Latest reply on Jul 31, 2013 4:21 AM by Jonathan Drummey

    Dynamically segmenting population and showing averages for each segment


      The goal is to dynamically segment a population and show various metrics, including ratios and averages for each segment.  In the attached (simplified) example, over time customers purchase just fruit, just dairy, or both, and we want aggregate metrics for each of those segments.  The only way I've found to do this in Tableau has been to place the customer ID on the detail shelf.  That seems to work for showing the number of customers in each segment or total number of purchases in each segment, but I haven't found a way to extend it to showing grand averages for each segment.  In other words, "on average, how many purchases does a customer who only buys fruit make?"


      As the example shows, this approach visualizes the sum of the averages for each customer in the segment, whereas what's really needed is the average of those averages.  The avg # per customer tab implies there were 19 purchases per fruit-only customer, but the real answer is much lower.


      A much smaller issue is that with a large population, the detail lines blur together and cause the chart lines to appear grey regardless of what color is chosen for the measure.


      Is there an alternative or easier way to approach this?  The real data is in a mySQL database, with more volume and complexity.