7 Replies Latest reply: Dec 26, 2011 4:23 AM by anubankar

# Calculate cumulative total

I have following report requirement:

Week No     Week Start Date     Total

1                3/1/2011                    50

2                10/1/2011                  50 + 25 = 75

3                17/1/2011                  75 + 100 = 175

I calculated week no, week start date and week end date in script as below

Weeks:

DISTINCT

WeekNum,

dual(weekstart(Date), WeekNum) as Week,

dual(weekstart(Date + 7), WeekNum) as NextWeek

RESIDENT

Calendar

WHERE

Year = 2011;

and used following expression:

sum({<Year={'\$(_SysCurrentYear)'},[Bill Date]={"< \$(=date(NextWeek,'\$(_SysDateFormat)'))"},Month=>}[Bill Value])

But this is giving error.

Can someone suggest some solution?

Message was edited by: anubankar

• ###### Calculate cumulative total

any help is appreciated...still not able to solve this problem

• ###### Re: Calculate cumulative total

HI Anubankar,

Please can you change this post from assumed answered? Because other community members will not read thinking it is taken care. I'll look into this sometime today. Meanwhile please change the assumed answer or post the new question on different thread.

Cheers - DV

• ###### Calculate cumulative total

How do i change the status? not able to edit it....

• ###### Re: Calculate cumulative total

You can't edit the status now. You can only do it within 20 mins of posting. I'd recommend posting on new thread. So you will get more responses.

Cheers - DV

www.qlikshare.com

• ###### Calculate cumulative total

use expression : above"Total"+Total u find ur result

else u can also use

Weeks:

DISTINCT

WeekNum,

peek("Total")+Total as Total1

resident

Calender

order by Startdate;

it will work fyn

let me knw wether it worked

thnxs n regards

Sachin S

• ###### Calculate cumulative total

Hi Anubankar, Try use this expression to calculate total cummulative:

=

rangesum(above(Total sum(Ledger.HIDE_CAL),0,RowNo(Total)))

Change this ' Ledger.HIDE_CAL ' ur value or measure.

All the best...

Regards,

Dushyant

• ###### Calculate cumulative total

Hi Dushyant

Yes. It worked.

My prblem solved with expression

rangesum(above(Total sum(Amount),0, rowno(Total))