Search code examples
google-sheetssplitpivotgoogle-sheets-formulagoogle-query-language

ARRAYFORMULA is only populating the first row


I have financial data that I am trying to summarize in a format that can be used by a line chart.

The example spreadsheet is here.

In my source data on the left, I have an entry per Date, Symbol, Account. I need to transform this data so there is a row per Date and a column for each Symbol. I will SUM Total Value regardless of account.

I found a way to pull a unique Date (see H2), and then transpose unique Symbols into columns (see I1).

I also found a way to use SUMIFS to get the aggregation I want (take a look at cell I2), but I can't figure out how to use ARRAYFORMULA to apply this value to all rows in column I.

I know I can drag my formula from I2 down to I3,I4,I.. etc, but this sheet is part of a larger project so I'd like it to auto-populate as dates are added to H.

From what I've read ARRAYFORMULA should apply the formula to multiple rows. What am I missing?

Thanks


Solution

  • use:

    =QUERY(A1:F, "select A,sum(F) where A is not null group by A pivot B", 1)
    

    enter image description here