0

我有日期、姓名和支付金额列。我想连续返回每个唯一日期,并为每个唯一日期返回所有名称和总支付金额。

=query(A:X,"SELECT V, SUM(X) WHERE A= date '2020-08-11' GROUP BY V")

这就是我现在所拥有的。这将返回该日期的名称和总支付金额,但我还有许多其他日期,在这种情况下,我将不得不手动编辑日期。

V = names
X = paid amount
A = dates

我正在寻找的数据结构

Date
2020-08-20                                          2020-08-21
Courier Name Summed Paid Amount for the 2020-08-20  Courier Name Summed Paid Amount for the 2020-08-21
Courier Name Summed Paid Amount for the 2020-08-20  Courier Name Summed Paid Amount for the 2020-08-21
Courier Name Summed Paid Amount for the 2020-08-20  Courier Name Summed Paid Amount for the 2020-08-21
Courier Name Summed Paid Amount for the 2020-08-20  Courier Name Summed Paid Amount for the 2020-08-21

我现在拥有的链接:

https://docs.google.com/spreadsheets/d/1JR20wsd9bAsQLEtRpqbPNOoDionA6sOmCVUibGPrOKA/edit?usp=sharing

4

1 回答 1

1

这是我添加到工作表中的数据透视查询。我认为这就是你想要完成的。

=query(A1:C19,"SELECT B, SUM(C) WHERE A is not null GROUP BY B PIVOT A label SUM(C)''")
于 2020-09-01T21:58:54.130 回答