2 Replies Latest reply: Oct 25, 2017 4:53 PM by Max Shevchenko RSS

    Accumulation in different periods

    Max Shevchenko

      Hi,

      You may find sample data as attachment qvw.

       

      I need to combine both accumulation and drill-down periods (Year-Month-Date).

      I tried an expression below but it doesn't show an expected result when selected specific Year or Month.

      =Rangesum(above(Sum({1<Date={'<=$(=max(Date))'},Year,Month>}Value),0,RowNo()))

       

      For example select Year=2015. It has correct data. The last month(Dec) of Group1 shows value=16425

      If select Year=2016 first month(Jan) shows value=930. It takes value from Jan 2015 (1395) and accumulate to value Jan 2016 (-465).

      Instead that it should take accumulated value on Dec 2015 (16425) and add value from Jan 2016 (-465) = 15960

       

      One important thing that items are not the same year to year. In this case I think can't be used peek or previous on script side.

       

      Any help would be highly appreciated.