8 Replies Latest reply: Oct 16, 2014 5:11 AM by cristian ivanoff

# RangeSum

Hello,

I have next example

First column weeknr

Second column number

Third column RangeSum

52     100     100

51     150     250

50     300     550

49     100     650

48     400     1050

etc.

I Have for third column next formula: RangeSum(Above(sum(BRUTO),0,rowno()))

But I want to have next output

52     100     1050

51     150     950

50     300     800

49     100     550

48     400     400

etc.

Also RangeSum in Reverse Order from what i now have.

Weeknrs. should be in order as in example.

Who can help me?

Thx.

• ###### Re: RangeSum

hi try below one

i think you are doing in UI,

take 3rd expression as

=\$(=sum(BRUTO))-RangeSum(Above(sum(BRUTO),0,rowno()))

• ###### Re: RangeSum

Thx for helping me, but doesn't work.

• ###### Re: RangeSum

Hi,

You can also try below expression:

if(RowNo()=1,sum(TOTAL number),Above(test)-Above(number))

Here test is the expression name.. change accordinbly .. sorting is done descending on weeknr..

HTH

Sushil

• ###### Re: RangeSum

Thx for helping me, but doesn't work.

• ###### Re: RangeSum

If you just want the reverse of a calculated column, try like:

=Below(YourCalColLabel, 2*(Ceil(NoOfRows()/2)-RowNo()))

• ###### Re: RangeSum

This also works:

=RangeSum(Below(Sum(BRUTO), 0, NoOfRows()+1-RowNo()))

Note that the names of Above and Below point to the visual orientation, not the effective RowNo-related order in your "table" object.

• ###### Re: RangeSum

Hii Andreas,

Use the following expression:-

if(isnull(above(Total Number)),sum(total Number),above(total [a])-above(total Number))

Find the attached QVW for solution.

• ###### Re: RangeSum

Table

A,B,C

52,y,x

51,y,x

In script:

Sort the table on Week desc. Then use numsum(B*-1,peek(C)) to create a new field with desired calculation.

Br

Cris