I have the following, working Google Sheets formula:
=IFERROR(QUERY(Transactions!A25:P990030,"select Sum(H) where B = date '2020-01-01' and F contains 'Product Sales' and K contains 'United States' and L contains 'Brand' label Sum(H) ''",0),"-")
I would like the date section, where B = date '2020-01-01'
, to auto-update in new cells, so it fills the 365 cells with the correct dates. However, I can't get it to work.
Column B also has the corresponding date, so B21 is equal to January 1st, 2020, and B22 to Jan 2, etc. However, it seems that the QUERY function and dates are tricky, as changing the date from '2020-01-01' to "2020-01-01" already turns into an error.
Example/test sheet: https://docs.google.com/spreadsheets/d/1uYWzfgmeiP4JEKM5sMzbxfL2DCKLtfMiK5u_pnIbQY8/edit?usp=sharing