Hello Pavan,
I believe that the workaround should be possible in any version (or at least those later than 7.1).
If you have 8.2 or later, however, it is much better to create "cumulative total" from the Data pane. Here is some documentation on that feature:
https://go.documentation.sas.com/?cdcId=vacdc&cdcVersion=8.2&docsetId=vareportdata&docsetTarget=p1tm...
Thanks,
Sam