Trying to find the average of the first 3 values in the column.
I'm already running a query to find the average data within the last 3 days
=average(query({$A$10:$A$107,$E$10:$E$107},"Select avg(Col2) where dateDiff(now(),Col1) < 4 group by Col1"))
Column A has dates, column E has sales, values begin in row 12
but on occasion, the data is not up to date and gives an error if the last 3 numbers fall outside of the dates.
I want to add an iferror
equation to get the next 3 averages.
This is also due to the spreadsheet starts at the beginning of the month at the bottom and the end of the month at the top. So there are a lot of blanks to skip.
I tried array and offset but I'm not getting the correct result.