
1. Re: Dynamically segmenting population and showing averages for each segment
david.millrod Jul 27, 2013 10:59 AM (in response to david.millrod)Shortly after posting the above question I posted what I thought was the answer, but it was an incorrect answer and I've since deleted it.
I've experimented with creating a version of the ratio that needs to be averaged across a calculated segment where I divide by window_count() or size() so that each customer only contributes their fractional portion to the composite grand average, but I'm unable to include in the formula the count of the number of people in each of those partitions. I think that's in part because the calculation "purchaser segment" is an aggregate calculation and can't be a dimension.
Anyone either know of an answer or that it is (gasp) impossible?
Thanks!

2. Re: Dynamically segmenting population and showing averages for each segment
Jonathan Drummey Jul 30, 2013 7:43 AM (in response to david.millrod)Here's a solution:
1) Uncheck "Ignore in Table Calculations" on the Purchaser Segment pill. That lets the table calculation partition (restart) for each new Purchaser Segment.
2) Set up a table calc with the formula IF FIRST()==0 THEN WINDOW_AVG(SUM([purchases])) END, and bring it into the view with a Compute Using of the Customer Number. The IF FIRST()==0 ensures that we only return the result once for each partition (the Purchaser Segment) and the WINDOW_AVG() does the right calculation.
I set this up in the attached.
Jonathan

3. Re: Dynamically segmenting population and showing averages for each segment
david.millrod Jul 30, 2013 11:19 AM (in response to Jonathan Drummey)Works perfectly, thanks!

4. Re: Dynamically segmenting population and showing averages for each segment
Jonathan Drummey Jul 31, 2013 4:21 AM (in response to david.millrod)You're welcome!

Jonathan Drummey
Quality Management Data Analyst
Southern Maine Medical Center
qm.jtd@smmc.org<mailto:qm.jtd@smmc.org>  207.283.7270