3 Replies Latest reply: Dec 26, 2011 4:22 AM by anubankar

# Cumulative Total

Reposting this as I am unable to change status of previous discussion....

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?

• ###### Cumulative Total

hi

try this

Week No,

Week Start Date ,

peeek(Total)+SUm(Total) as total

from

asd.qvd;

may it helps you

thanks

rohit

• ###### Cumulative Total

try this

[Week NO],

[Week SD],

[BILL VALUE],

numsum( [BILL VALUE],peek(Total) ) as Total

resident AMT;

drop table AMT;

• ###### Cumulative Total

My prblem solved with expression

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