3 Replies Latest reply on Nov 12, 2013 8:59 PM by Wilson Po

# How to calculate sum for each group of values that align vertically in a scatter plot?

How to calculate sum for each group of values that align vertically in a scatter plot?

• ###### 1. Re: How to calculate sum for each group of values that align vertically in a scatter plot?

If its a one-time analysis and you don't need it to be dynamic, you could create sets from the marks that align vertically and use those to calculate a sum.  Otherwise, I'm not sure off the top of my head--let us know what your requirements are, and in order to get the best help, I'd mock up a sample scatter plot workbook to post here that demonstrates the setup in your production workbook.  Then, others can take a look and try to help you.

• ###### 2. Re: How to calculate sum for each group of values that align vertically in a scatter plot?

This is an example of what I am trying to do.  Add up amounts for each bar.

• ###### 3. Re: Re: How to calculate sum for each group of values that align vertically in a scatter plot?

Hi Peter,

One thing that you should be able to use is a commonly overlooked feature: Ignore in Table Calculation

This feature is available for any Discrete aggregated measure, and can be used as a means to restart/partition calculations we want to do on top of the values.  As we are trying to get the total revenue for all classes of a particular class size, we can add SUM(Number of Student) to the level of details as a discrete field.  Once we have this we can use a table calculation to get the total of the bars:

IF INDEX()=1 THEN WINDOW_SUM(SUM([Revenue Per Class])) END

This will total the Revenue for all classes for each class size, but will only display this total once rather than have the total repeated.  I did a example of this using the sample data in the attached.  Hope this helps!