Search code examples
google-sheetssumtransposegoogle-sheets-querygoogle-query-language

Using query to search through table based on vertical and horizontal values


I have a table for employees and dates, I want to find out how many cases they solved on an exact date. I tried using a query but it's not working for me as its a new challenge for me to make a query that works based on the horizontal and vertical values. here is an example:

https://docs.google.com/spreadsheets/d/19x2jGYM7xt_WIZN_OGPwTe_7q26Jj57l9Z0PUmSv0I8/edit#gid=0


Solution

  • try:

    =QUERY(TRANSPOSE(QUERY(TRANSPOSE(A1:H), 
     "where Col1 matches 'Day|"&I3&"'", 0)), 
     "select sum(Col2) 
      where Col1 ="&DATEVALUE(I2)&" 
      label sum(Col2)''")
    

    0