Raj B
Raj B

Reputation: 1

Google Sheets Query - Array formula in where clause and group by

I want to get sum of tax value, for each unique Tax Number, Bill nos for a set of Tax Numbers Somehow my formula is failing. Let me know what mistake am I doing.

=Query(Bills!$A$2:$CM, "Select L,C, SUM(BC), SUM(AV), SUM(CE), SUM(CC), SUM(CD) where L Matches "&ArrayFormula("'"&textjoin("|",1,A2:A10)&" Group by L,C ",0))")")")

Upvotes: 0

Views: 173

Answers (1)

JPV
JPV

Reputation: 27262

See if this helps

=Query(Bills!$A$2:$CM, "Select L,C, SUM(BC), SUM(AV), SUM(CE), SUM(CC), SUM(CD) where L Matches '"&textjoin("|",1,A2:A10)&"' Group by L,C",0)

Upvotes: 1

Related Questions