4 Replies Latest reply on Feb 15, 2016 5:04 AM by Mark Fraser

# Aggregated yield calculation

Hi

the attached Workbook contains dummy data for yield calculation.

I need to calculated to total yield which should be a multiplication of all the line yields (also known as product):

I.e. : 0.9532*0.9163*.........

how can it be done?

• ###### 1. Re: Aggregated yield calculation

Hi Moshe,

It looks like you need a 'Running Product' calculation. This is the same as a running sum, but instead of adding the cumulative field it multiplies.

The syntax you will need is:

EXP(RUNNING_SUM(LN(SUM([Yield]))))

* IIF(RUNNING_MIN(ABS(SUM([Yield])))=0,0,1)

I found this solution previously at

@alex.hienold

1 of 1 people found this helpful
• ###### 2. Re: Aggregated yield calculation

Howdy Moshe,

I've edited your workbook. The following field will be a bit easier:

SUM(Yield) * PREVIOUS_VALUE(1)

Make sure that the direction of your table calculation is running down the table. Further don't drag a measure onto the rows shelf and wrap it as an attribute to view it as a crosstab. Drag that measure to the text/labels shelf of your marks card. This way it is still treated as a value and you can sort high to low based on it much easier (if you so desire).

Cheers!

Carl Slifer

InterWorks

1 of 1 people found this helpful