It sounds like your data may need to be pivoted before performing your analysis.
After pivoting your data, turn the Pivot field names field into a date type field.
Then add pivot field names to the columns shelf and the pivot field values field to the rows shelf
Then try out the "creating a rolling calculation" article that Lenaic suggested.
Hope this helps!