2 Replies Latest reply: Sep 2, 2014 9:16 PM by jagan mohan rao appala

# Total of two formulas

I would like to have one column (New field) with the total based on a calculus. However, I can not manage to do this:

The calculus is

sum(distinct width)
*
sum(large)

and it should multiple line per line having a new column (new field) being the sum of all the lines, should it be with an aggregate, including total in set analysis?

For example, I have the large and width and I want a new column with the sum of each line after doing the calculus width*large

 large width width*large New field 85,37 0,0109 0,93 1,56 80,16 0,0079 0,63 1,56

any ideas?

• ###### Re: Total of two formulas

that you can do it by AGGR..

sum (Total Aggr(sum(Distinct width) * sum(large),YOUR DIMENSIONS IN CHART))

For example.

sum (Total Aggr(sum(Distinct width) * sum(large),FIELD1,FIELD2))

• ###### Re: Total of two formulas

Hi,

Try like this

Script:

*

INLINE [

large, width

85.37, 0.0109

80.16, 0.0079];

Straight Table:

Dimensions : large, width

Expressions:

width * large : sum(width * large)

New Field : sum(TOTAL width * large)

Hope this helps you.

Regards,

Jagan.