Search code examples
google-sheetsimportsumvlookupgoogle-query-language

Filter and Importrange not accepting multiple criteria in Google Sheets


I'm trying to use this formula but the last IMPORTRANGE criteria is not working:

Formula:

=IFNA(filter(SUMIFS(IMPORTRANGE("URL","GA_Base!C:C"),IMPORTRANGE("URL","GA_Base!A:A")=H77), IMPORTRANGE("URL","GA_Base!B:B")="DP"))

This is the criteria that is not working:

IMPORTRANGE("URL","GA_Base!B:B")="DP"

Am I doing something wrong because it's multiple criteria?


Solution

  • try:

    =INDEX(IFNA(VLOOKUP(E6:E36, QUERY(
     IMPORTRANGE("1qsdPwnYRbmj5oW5f2QOwLfsPAloLsAHnoJWdF9cQELg", "Base!A:C"), 
     "select Col1,sum(Col3) where Col2 = 'DP' group by Col1"), 2, 0)))
    

    enter image description here