15 Replies Latest reply: Sep 25, 2017 6:29 AM by Anil Samineni

# How to write a Cumulative expression for attached data

Hello All,

I was trying to write a cumulative sum expression but some reason it is giving zero as out put ..what i mean is

For

Calmonth(Field) =201705-----it has to sum 201704+201705

=201706------it has to sum 201704+201705+201706

........So on

Expression i tried is :

RangeSum(Above(sum(VOLUME)), 0, RowNo())

Any suggestion on how to write a cumulative expression for below attached data ..

• ###### Re: How to write a Cumulative expression for attached data

Try this?

Rangesum(Below(Sum(VOLUME),0),Above(VOLUME,1,RowNo(TOTAL)))

• ###### Re: How to write a Cumulative expression for attached data

I tried your expression what i am getting is

when i tried SUM(volume) i am getting same

I have attached Sample data aswell......

• ###### Re: How to write a Cumulative expression for attached data

Then Try this?

RangeSum(above(TOTAL sum(VOLUME),0,RowNo(TOTAL)))

• ###### Re: How to write a Cumulative expression for attached data

Thanks Man its is working but Anil ,is it possible to modify your expression ,i mean your expression is prefect when

if(month<month(today),RangeSum(above(TOTAL sum(VOLUME),0,RowNo(TOTAL))),   ?  )

if month = month(today),then it should not sum current month value...

i mean  current month is September so till august the above expression is prefect and from September to above

201708=sum(201704 to 201708)

201709=sum(201704 to 201708) because  month is not lesser than month of today

201710=sum(201704 to 201709)

201711=sum(201704 to 201710)

• ###### Re: How to write a Cumulative expression for attached data

May be possible using this..

if(month<month(TOTAL today()),RangeSum(above(TOTAL sum(VOLUME),0,RowNo(TOTAL))),  'you can initiate anything' )

• ###### Re: How to write a Cumulative expression for attached data

HI,

i am trying to convert

in to this

Sum({<CALMONTH ={">=\$(=YearStart(Max(CALMONTH))) <=\$(=max(CALMONTH))"}>} VOLUME)

but something i am missing ,can you help

• ###### Re: How to write a Cumulative expression for attached data

you can write this

RangeSum(above(TOTAL sum({<CALMONTH ={">=\$(=YearStart(Max(CALMONTH))) <=\$(=max(CALMONTH))"}>} VOLUME),0,RowNo(TOTAL)))

• ###### Re: How to write a Cumulative expression for attached data

Hi,

what do you want to show if month<month(Today()) is not true ????

Regards

• ###### Re: How to write a Cumulative expression for attached data

Output as zero in a chart or are you doing this in a text box object?

• ###### Re: How to write a Cumulative expression for attached data

HI ,i am doing it in Table....

• ###### Re: How to write a Cumulative expression for attached data

Is my second reply won't for you?

• ###### Re: How to write a Cumulative expression for attached data

Hi,

try

Rangesum(Above(sum(VOLUME),0,RowNo(TOTAL)))

Regards,

• ###### Re: How to write a Cumulative expression for attached data

Hi Naveen,

The brackets in your original expression were wrong, try;

Rangesum(Above(Sum(VOLUME),0, RowNo()))

gives:

CALMONTH Sum (VOLUME) Rangesum(Above(Sum(VOLUME),0, RowNo()))
540620590.72295 0
20170488254316.24301288254316.243012
201705108867027.09298197121343.33599
201706142117893.154339239236.48999
20170771972231.979963411211468.46995
201708105148241.14499516359709.61495
20170924260881.108001540620590.72295
2017100540620590.72295
2017110540620590.72295
2017120540620590.72295
2018010540620590.72295
2018020540620590.72295
2018030540620590.72295

Regards

Andrew

• ###### Re: How to write a Cumulative expression for attached data

Use Full accumulation option in expression tab-click on this for particular chart