Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Spreadsheet AVERAGE formula ignores filter

I have a Google Spreadsheet with a simple column (A for eample) with numeric values.

A
1
2
5
7

On another cell I have a basic formula like this one below.

=AVERAGE(Data!A:A)

If I apply a filter on column A the average doesn't change and ignores the filter. I know that there's an expression that can receive one or more criteria as parameter (AVERAGEIFS) but I don't know how to get the current filter applied.

like image 823
raz3r Avatar asked Oct 10 '16 08:10

raz3r


People also ask

How do I filter averages in Google Sheets?

To add a filter to this data, we can highlight cells A1:B10, then click the Data tab, then click Create a filter: We can then click the Filter icon at the top of the Points column and uncheck the box next to the first three values 84, 89, and 93: What is this?

Why filter is not working in Google Sheets?

This was done when Data -> Create Filter menu option was used when a range is already selected. You can delete this filter by selecting Data -> Turn off Filter , then recreating another for the whole sheet by selecting the first cell in the whole sheet, then selecting Data -> Create Filter again.


1 Answers

Try this one:

=SUBTOTAL(1,A:A)

but I prefer filter function:

=AVERAGE(FILTER(A:A,B:B="a"))
like image 128
Max Makhrov Avatar answered Sep 18 '22 18:09

Max Makhrov