On Sheet 1, I have dataCATEGORY  |  PATIENT  |    DATE    |  AMOUNTVision    |  Joe      |  1/1/2016  |   $100Vision    |  Joe      |  1/2/2016  |   $100Vision    |  Joe      |  1/3/2016  |   $100  On Sheet 2,CATEGORY  |  PATIENT  |  TOTAL 2016  |Vision    |  Joe      |     $300     |However I don't have this working.The query I am using in Column C of Sheet 2 is:=QUERY('Sheet'!1:1000, SELECT SUM(D) WHERE A='& A2 &' AND B='& B2 &' AND '&YEAR(C)&'='2016' label SUM(D) '')However I am getting an error#NAME?Unknown range name: 'C'.Why can't I pass the column C to the YEAR function?
How can you use a function and pass it a column inside a Google Sheets Query?
google spreadsheets;worksheet function;google spreadsheets query