1

I've tried applying some criteria, but the row is still there.

This first empty row shouldn't be there.

Here is the formula, in case you'd like to help me correct it: =if(I4<>"", { IFERROR(query(Datasets!X3:AU,"select AS, AT, AJ, AR where AS matches date '"&TEXT(DATEVALUE(I4),"yyyy-mm-dd")&"'",0),{"","","",""}); IFERROR(query(Datasets!BC3:BT,"select BC, BD, BS, BQ where BC matches date '"&TEXT(DATEVALUE(I4),"yyyy-mm-dd")&"'",0),{"","","",""}) }, UNIQUE({query(Datasets!X3:AU,"select AS, AT, ' ', SUM(AR) where AS is not null group by AS, AT, ' ' label ' '' ', SUM(AR) ' '",0); query(Datasets!BC3:BT,"select BC, BD, ' ', SUM(BQ) where BC is not null group by BC, BD, ' ' label ' '' ', SUM(BQ) ' '",0) })) enter image description here

player0
  • 124,011
  • 12
  • 67
  • 124
onit
  • 2,275
  • 11
  • 25
  • 1
    remove the spaces in the labels. `label x ' '` -> `label x ''` or use `query(formula,"offset 1",0)` – z'' Dec 24 '22 at 20:46
  • I'll try that, @ztiaa! Thanks for your comment and congrats on your website. – onit Dec 26 '22 at 13:27

1 Answers1

1

try:

=IF(I4<>"", {IFERROR(QUERY(Datasets!X3:AU, 
 "select AS,AT,AJ,AR 
  where AS matches date '"&TEXT(DATEVALUE(I4), "yyyy-mm-dd")&"'", ), {"","","",""}); 
 IFERROR(QUERY(Datasets!BC3:BT, 
 "select BC,BD,BS,BQ 
  where BC matches date '"&TEXT(DATEVALUE(I4), "yyyy-mm-dd")&"'", ), {"","","",""})}, 
 UNIQUE({QUERY(Datasets!X3:AU,
 "select AS,AT,' ',SUM(AR) 
  where AS is not null 
  group by AS,AT,' '
  label' ''',SUM(AR)''", ); 
 QUERY(Datasets!BC3:BT, 
 "select BC,BD,' ',SUM(BQ) 
  where BC is not null 
  group by BC,BD,' ' 
  label' ''',SUM(BQ)''", )}))
player0
  • 124,011
  • 12
  • 67
  • 124
  • That actually didn't solve it. Couldnt see what changed in the formula... Thanks for your answer. – onit Dec 26 '22 at 13:23
  • 1
    i've wrapped the `QUERY()'s` in a new `QUERY()` and it worked. Thanks a lot! – onit Dec 26 '22 at 15:38