Home > Software engineering >  How can I use query of Google Spreadsheet to sum the amount in another sheet filtering by month & da
How can I use query of Google Spreadsheet to sum the amount in another sheet filtering by month & da

Time:09-25

I have two spread sheet 1 is record for customer data and 1 is use for check the amount for particular month. I would to the calculation sum of the amount from first sheet to second sheet with filtering by month & year

First sheet will look something like this

enter image description here

In second sheets the only things that I would like to show is amount. Does not have to show the date anymore since filtering the amount by month & year

The Formula that failed is

=QUERY('CustomerData'!A:B, "select A, SUM(B) WHERE month(X)=month(date'2021-9-30')")

CodePudding user response:

Try

=QUERY(CustomerData!A:B, "select sum(B) WHERE A>=DATE'2021-09-01' and A<=DATE'2021-09-30' ")
  • Related