Announcements
cancel
Showing results for
Did you mean:
Not applicable

## 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

1 Solution

Accepted Solutions
Not applicable
Author

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

7 Replies
Not applicable
Author

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

Luminary Alumni

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

Not applicable
Author

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

Luminary Alumni

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

Anonymous
Not applicable
Author

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

Not applicable
Author

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

Not applicable
Author

Hi Dushyant

Yes. It worked.

My prblem solved with expression

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

Community Browser