TC76
TC76

Reputation: 870

Query works in one sheet, but not in another?

This QUERY works on one sheet, but not another. Both sheets appear to be formatted the exact same with the same data, but when I try to apply it to my working sheet, I get a "AVG_SUM_ONLY_NUMERIC" error. I assume it must have something to do with the formatting of the column, but even after changing the formatting to "automatic", it still doesn't work.

Here is the formula in question:

=QUERY(QUERY(projectMaterials!A3:K, 
 "select A,sum(B),C,D,E,F,G,H,I,J,K 
  where A is not null 
  group by A,C,D,E,F,G,H,I,J,K", 0),
 "offset 1", 0)

It works on this sheet, but not on this one...

Upvotes: 0

Views: 270

Answers (1)

player0
player0

Reputation: 1

=ARRAYFORMULA(QUERY({projectMaterials!A3:A,projectMaterials!B3:B*1,projectMaterials!C3:K}, 
 "select Col1,sum(Col2),Col3,Col4,Col5,Col6,Col7,Col8,Col9,Col10,Col11 
  where Col1 is not null 
  group by Col1,Col3,Col4,Col5,Col6,Col7,Col8,Col9,Col10,Col11
  label sum(Col2)''", 0))

enter image description here

Upvotes: 1

Related Questions