-1

I am trying to use this code to return values from a certain date

=query(Overview!A:G,"select B where A = date '" & text(B2, "yyyy-MM-dd") & "'")

The problem is that on the other sheet I'm querying from multiple sheets and then the query above is separating the value into the values from all the original sheets. It looks like this:

Followers

How do I write the query so it combines the 1 with the 154280 from the other sheet.

By "it combines", I mean aggregate SUM. The number is aggregate the sum in the master sheet, but it's separating out once I rerun a new query over the other query.

Rubén
  • 34,714
  • 9
  • 70
  • 166
  • 1
    By "combine" do you mean to concatenate or to aggregate (SUM, AVERAGE, COUNT, ...)? – Rubén Oct 24 '17 at 00:54
  • Aggregate SUM. The number is aggregate the sum in the master sheet, but it's separating out once I rerun a new query over the other query. Does that make sense? – Nicholas Graham Platt Oct 24 '17 at 14:00

1 Answers1

0

Use the aggregation function SUM:

=query(Overview!A:G,"select SUM(B) where A = date '" & text(B2, "yyyy-MM-dd") & "'")

Reference

Rubén
  • 34,714
  • 9
  • 70
  • 166
  • Wow worked beautifully! Thank you. Small question to continue to learn how to query writing. How would I remove the text "sum Followers" that shows up when I query. I only want the number. – Nicholas Graham Platt Oct 25 '17 at 20:16
  • On the formula in the answer replace `"'"` by `"' label SUM(B) ''"` :) – Rubén Oct 25 '17 at 20:25