0 votes
1 view
in BI by (17.6k points)

Using Tableau 8.1.
Daily data like this:

Date     Sales

1-1-14     $5

1-2-14     $2

...

6-15-14    $15

Which can be aggregated to weeks of course

Week 1   $15

Week 2   $12

Week 3   $10

Week 4   $13 

etc.

I would like to get the weekly average 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  

Does that make sense? If you simply put "average" in the tableau table, it gives the average daily value PER WEEK (or month) < - I don't want that. I want the average of the weekly totals per month. 

1 Answer

0 votes
by (47.2k points)
  • You have to create these calculations

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

  • And then, you can simply report Weekly Average x Month (or Quarter or Year, etc.)

(Note: Some weeks have < 7 days).

Related questions

0 votes
1 answer
asked Jul 30, 2019 in BI by Ashok (47.2k points)
0 votes
1 answer
0 votes
0 answers
asked Aug 28, 2019 in BI by Vaibhav Ameta (17.6k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...