Tableau 8.1.
Sample Data:

```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.

What I want?

I would like to get the weekly average of each month
Somewhat 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.

Jun 27, 2018 in Tableau 13,392 views

## 1 answer to this question.

You can create these calculated fields:

```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: Some weeks have < 7 days).

or

simply create one calculated field.

```WINDOW_AVG(SUM([Sales]))
```

and drag your Date pill onto the rows shelf twice, one aggregated to day, the other to week. Make sure pills are set to discrete (blue) and drag your Sales measure onto the shelf, also as discrete.

• 10,240 points

## How to calculate Yearly Average when few month data are missing ?

It depends whether you want to skip ...READ MORE

## How to export the IdP (Identity provider) XML Metadata from Keycloak which is imported to Tableau?

Keycloak version 1.6.1, Goal: Keycloak should act ...READ MORE

## How to color code cells of a column based on the text value in Tableau

You can use the following steps to ...READ MORE

## Calculated filed with if-then

Below is the required code:  IF (NOT ISNULL([test2])) ...READ MORE

## How can I download tableau workbook with its data from tableau server?

In essence, no. Since the workbook is ...READ MORE