Announcements
cancel
Showing results for
Did you mean:
Not applicable

## How to sum across rows in a pivot table (running total)

Hi All

I have a pivot table with monthly total across 12 months in a pivot table

I have tried using  the function RangeSum(sum(total), before(sum(total))) to create a running total YTD total but it is not consistent

Is there another function that will allow me to create a running total

e.g

Jan   feb    Mar   Apr

AP          10   20     30    40

AP YTD   10  30     60    100

Cheers

Brett

1 Solution

Accepted Solutions
Luminary Alumni

Hi,

Try this expression and please find attached file for solution.

=RangeSum(Alt(Before([AP YTD]), 0), Sum(AP))

Regards,

Jagan.

6 Replies
MVP

Hi

Try like this

Calculating rolling n-period totals, averages or other aggregations

Thanks & Regards, Mayil Vahanan R
Luminary Alumni

Hi,

Try this expression and please find attached file for solution.

=RangeSum(Alt(Before([AP YTD]), 0), Sum(AP))

Regards,

Jagan.

Not applicable
Author

Thanks Jagan

I am finally understanding how Pivot  tables work , Cheers Brett

Not applicable
Author

Thanks Jagan

I am finally understanding how Pivot  tables work , Cheers Brett

Not applicable
Author

Is it also possible to perform a %YTD calculation in a line chart given the same scenario. I have tried using accumulation using sum(AP)/sum(TP) but do not get the correct result

e.g

Jan   feb    Mar   Apr

AP              10   20     30    40

AP YTD       10  30     60    100

TP YTD        15  35    65    110

Not applicable
Author

Hi Jagan,

Thanks a lot lot lot..............

Regards,

Sagar Gupta

Community Browser