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

    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:

      LOAD

                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?