Averaging win/loss data by day in Google Sheets

formulasgoogle sheets

There's been similar questions answered here but I've been unable to apply those tips to my scenario. I keep data on gambling wins and loses. I want to calculate averages based on the day of the week. I should point out my spreadsheet includes dates with no data (for a reason). The formula I've been trying use for this is =AVERAGE(IF(C2:C19="Mon",B2:B19)). I've included a sample sheet. My knowledge of spreadsheets is severely limited. I know just enough to get in trouble. Thanks in advance for any help, this is my first question on the forum.

Best Answer

Try

=query(A2:B,"select dayOfWeek(A), avg(B) where not A is null group by dayOfWeek(A) label dayOfWeek(A) 'Day', avg(B) 'Average by Day' format dayOfWeek(A) 'dddd' ")

This will generate all the results in one go.