Reputation: 13
I am trying to create a Dynamic sheet using query
ARRAYFORMULA(query(1*{text(Temp!A1:A13,"MM-YYYY"),Temp!B2:E13},"select Col1, sum(Col5) where Col1>="&C2&" AND Col1<="&D2&"IF(A2="All",," AND Col3='"&A2&"'")&" GROUP BY Col1 Label Col1 'MONTH'"))"))
But it has parse error
https://docs.google.com/spreadsheets/d/13ud3bMd12FcYuc5gok5QxGk_HoaEanVSLYr-0YZgVm4/edit?usp=sharing
Upvotes: 0
Views: 61
Reputation: 27282
Try
=query({Temp!A2:E},"select Col1, sum(Col5) where Col1>= date '"&TEXT(C2, "yyyy-mm-dd")&"' AND Col1<= date '"&text(D2, "yyyy-mm-dd")&"'"&IF(A2="All",," AND Col2='"&A2&"'")&" GROUP BY Col1 Label Col1 'MONTH'", 0)
and see if that works?
Upvotes: 0