Changing sales data from Cumulative to week totals

MadHatsJess

New Member
Joined
Jul 12, 2017
Messages
27
Hi

I have three years worth of sales data by week for 50 products. I want to do a pivot (grouped by month and year) to show YOY sales in a Pivot chart and use slicers to select the product.

The problem I have is that the data I have is rolling so the pivot table adds the sales together. See example below

01/01/2016 - 10
07/01/2016 - 12
14/01/2016 - 20

01/01/2017 - 15
07/01/2017 - 22
14/01/2017 - 30

01/01/2018 - 20
01/01/2018 - 32
01/01/2018 - 40

Is there a quick way to change the data to how many sales where made that week?

Or

A better way of doing this?

I have a lot of data and have tried ordering the data and doing Week 2 minus 1 but its very time consuming to update

Thanks :D
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Assuming your data is sorted by product then date, drag a difference formula down with an if statement that resets at each new product and year.
 
Upvote 0
Hi

That's what I do at the minute but without the IF statement to reset at the product/year. If I could get that to work it would be perfect!
 
Upvote 0
Something like:


Excel 2010
ABCD
1ProductDateCumulative SalesWeekly Sales
2A1/1/201610
3A1/8/2016122
4A1/15/2016208
5A1/1/20171515
6A1/8/2017227
7A1/15/2017308
8A1/1/20182020
9A1/8/20183212
10A1/15/2018408
11B1/1/201655
12B1/8/201672
13B1/15/2016158
14B1/1/201799
15B1/8/2017134
16B1/15/2017196
17B1/1/201833
18B1/8/2018118
19B1/15/2018154
Sheet10
Cell Formulas
RangeFormula
D3=IF(AND(A3=A2,YEAR(B3)=YEAR(B2)),C3-C2,C3)
 
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,122
Members
452,381
Latest member
Nova88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top