I've got a table with:
Date -- Amount -- Weeks Ago
10/24 -- 5 -- 0
10/23 -- 2 -- 0
10/22 -- 1 -- 1
...
10/14 -- 3 -- 2
Where Date has one entry per day, Amount, is a random value from 0 to 5, and Weeks Ago is the difference between Today() and the Date in weeks of the year. I want to output a graph that has the last 7 weeks while progressively adding the amounts together. Using the data above,
Week 0 = (5 + 2 + 1 + ... + 2)
Week 1 = (1 + ... + 2)
Week 2 = 2
Here is my first attempt at doing this. Am I anywhere close? Do I even have the right approach?
Sum Each Weeks Ago = SUMX( CALCULATETABLE('Sheet1'[Amount],
'Sheet1'[Weeks Ago] = 0,
'Sheet1'[Weeks Ago] = 1),
'Sheet1'[Weeks Ago] = 2),
'Sheet1'[Amount])
hi travbum,
for inspiration, see: http://www.powerpivotpro.com/2011/06/running-totals-without-a-traditional-calendar-table/
User | Count |
---|---|
74 | |
37 | |
33 | |
15 | |
12 |
User | Count |
---|---|
84 | |
30 | |
26 | |
16 | |
13 |