4 Replies Latest reply on Feb 2, 2019 10:39 PM by May Ali

# Calculating an average for each Weekday

I am trying to get a bar graph for each weekday to calculate total amount of sales.

See attached data set.  The calculation I would expect to be something like this.

(Sum of sales for that day) / (Number of that weekdays in the data set)

Mon: (453 + 21) / 2

Tue: 4567 + 200 / 2

.

.

.

Fri: (10 + 11 + 190 + 15) / 2

See attached also the type of chart I would like.

Any help appreciated as not been able to work out how to do this?

Thanks

Paul

• ###### 1. Re: Calculating an average for each Weekday

Paul,

Put the date pill In columns and change it to DATEPART('weekday', [Date]).

In the rows field put SUM([Sales])/COUNTD([Date]).

See attached.

Thanks,

Scott

• ###### 2. Re: Calculating an average for each Weekday

Hi Paul,

Find my approach as reference below and stored in attached workbook version 10.3 located in the original thread.

1. D1. Date (Weekdays)

2. M1. Count Dates: {fixed[D1. Date (Weekdays)]:countd([Date])}

3. M2. Avg per Weekday: sum([Sales])/sum([M1. Count Dates])

Hope it helps,

Regards,

Norbert

• ###### 3. Re: Calculating an average for each Weekday

Thank you all, very helpful and interesting the different approaches.  I have been struggling with that all week :-)

Have a good weekend!

Paul

• ###### 4. Re: Calculating an average for each Weekday

Hi

Can you tell me how I post my questions? from where ?, I new here.