1 Reply Latest reply on Jul 25, 2018 1:32 AM by Ankit Bansal

# Rolling Sum, Cumulative Total Week on Week Difference

Hi all,

This may be a basic question, but I am very new to tableau.

I am having an issue doing a week on week calculation on a rolling sum. for the output I have to have the most recent date as the first column. I have created a running total that restarts at the beginning of each week (Sat-Friday) I did this using the calculated field rolling total, sort order date created maximum ascending. The totals are correct.

When I try using the Percent difference from Calculation it appears to be working out the WoW Difference on the total number of records for that day only, not the cumulative total. Is there a simple way of doing a calculation to do a wow % difference between the two cumulative totals?

Cheers

Pete

• ###### 1. Re: Rolling Sum, Cumulative Total Week on Week Difference

Peter,

Can you try running_sum().

it will look like this:

(RUNNING_SUM(sum([Sales])) - lookup(RUNNING_SUM(sum([Sales])),-1)) / lookup(RUNNING_SUM(sum([Sales])),-1)

hope this works.

Thanks,

Ankit Bansal

1 of 1 people found this helpful