Table - Weekly Average of Daily Data

Using table 8.1.
Daily data:

Date     Sales
1-1-14     $5
1-2-14     $2
...
6-15-14    $15

Which can be aggregated up to weeks of the course.

Week 1   $15
Week 2   $12
Week 3   $10
Week 4   $13

and etc.

I would like to get the average for the week of each month.
So like this:

          Weekly Average
Month 1     (weekly average of the weekly total sales)  ($15+$12+$10+13)/4 = 12.5
Month 2 
Month 3 

It makes sense? If you just put the "average" in the table of the table, it gives the average value of the day per week (or month) - I do not want this. I want the average weekly totals per month.

+4
source share
2 answers

Pretty simple, actually. Create these calculations

Unique Weeks = COUNTD(DATEPART('week',[Date]))
Weekly Average = sum([Sales])/[Unique Weeks]

Then simply report Weekly Average x Month (or Quarter or Year, etc.)
(Note: several weeks have <7 days).

+3
source

.

WINDOW_AVG(SUM([Sales]))

"" , , - . , () , .

+2

All Articles