Pivot table with multiple items per transaction

时间:2016-02-03 03:18:00

标签: excel pivot-table

I am trying to create a pivot table and pivot chart in excel 2016 based off of cattle auction data. Data for each auction includes: Head of Cattle, total weight, avg weight, price per lb, and price a head. I am trying to show the avg price per head of particular weights. The trouble is when one transaction is for 30 head @ $800 and the next is for 1 @ $700 it shows average price of $750. But I want to show the average weight of the 31 cattle at $796 not the average of the transactions @ $750. Any ideas?

1 个答案:

答案 0 :(得分:0)

根据您在问题中的陈述,听起来您应该在数据转换之前对数据进行一些计算。基本上,创建一个新的列,即[transaction] * [牛头],所以在这种情况下,新的列值分别为24000和700.

从那里,您可以插入数据透视表并使用自定义计算。在数据透视表中点击'选项'然后点击"字段,项目和&套&#34 ;.然后将公式栏中的计算设置为新的字段除以牛头。