Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9786

How may I add an average count of rows by weekday to this example Google Sheets

$
0
0

Here is an example Google Sheet that summarizes Col A, D by weekday totals and counts.

I would like to add an Average number of items by Weekday, like K9 L9 but show it in formula K1.

There are two(2) Mondays and one had 10 rows, the other 2 so the average is 6 for Mondays so far.

https://docs.google.com/spreadsheets/d/1VvJOtnG1wyIjAIiQUerwqZLuTmDs3RryyGwLsLBwSZo/edit?usp=sharing

This is the formula in K1:

=QUERY(Query(A1:D, "select (A), sum(D)                     where A is not null and dayOfWeek(A)<>1                    group by (A)                     order by  dayOfWeek(A) "),"select dayofWeek(Col1), Count(Col1), Sum(Col2)               group by dayofWeek(Col1)                label dayOfWeek(Col1) 'Weekday', sum(Col2) 'Total', count(Col1) '#'               format dayOfWeek(Col1) 'dddd', sum(Col2) '###0.'")

Viewing all articles
Browse latest Browse all 9786

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>