8 Replies Latest reply: Jul 9, 2014 2:53 AM by Joaqu�n L�zaro

# Dealing %

Hello:

I have an expression to calculate the % of a total, I need a second expression that accumulate he previous % ... but I'm not able to write it.

This is the expression

NUM( 100 *

SUM( Sales )

/ SUM( TOTAL Sales)

, \$(NumberFormat2Dec), DecimalSep, ThousandSep)

And this is the table that i can't get

Which expression i need write in column 2 ??

Thank you very much,

Joaquín

• ###### Re: Dealing %

rangesum (above(sum(x),0,2))

//'x' should be replaced by the label of the first column/Column(1).

• ###### Re: Dealing %

Thanks tresesco

I've written rangesum (above(sum(x),0,2)) in second expression and tagged column 1 as x

The value of column2 is 0 for all the rows

• ###### Re: Dealing %

• ###### Re: Dealing %

Hi:

= rangesum(above(X,0,2))

= rangesum(above('X',0,2))

In both cases I get 0 for all the rows ... the first is marked as wrong expression it editor because is not a field name (X is the tag of the expression

• ###### Re: Dealing %

Sorry, Sum() should not be there. try:

rangesum (above(x,0,RowNo(Total)))

RowNo(Total) - would be required to sum up till the end.

• ###### Re: Dealing %

Try this

rangesum(above(sum(Sales),0,rowno(total)))

• ###### Re: Dealing %

Hi guys:

The correct expression for column2 is:

= NUM( 100 *

RangeSum(Above(SUM( Sales ), 0, RowNo()))

/ SUM( TOTAL Sales )

, \$(NumberFormat2Dec), DecimalSep, ThousandSep)

and it works under two conditions: a) The chart must be a straight table and b) Only with one dimension

Thanks again