我想要以下内容:
成本随时间变化,因此这必须计入值的总量。
在这里播放: https://docs.google.com/spreadsheets/d/1CCwoBxXYGPpR3Fog7gtyQXfH_soaZBKBHvxeikFnfzI/edit?usp=sharing
答案 0 :(得分:2)
由于价格可能会随时间变化,因此无法使用您之前的linked question中使用的公式。
请使用以下公式考虑价格变化。
=QUERY(QUERY(A1:C,"select A, sum(B), sum(B)*C where A is not null group by A, C" ),
"select Col1, sum(Col2), sum(Col3) group by Col1 order by sum(Col3) desc label sum(Col2) 'Total Quantity', sum(Col3) 'Item Cost' ")
使用的功能: