vba 如何将数据透视表中的列除以 Excel 2013 中同一个数据透视表中的另一列

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/41058395/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-12 11:41:08  来源:igfitidea点击:

How can I divide the column in a Pivot table by another column in the same PIVOT table in Excel 2013

excelexcel-vbapivot-tablevba

提问by Santosh Mangang

Data

数据

I have tried inserting calculated field, but it only gives a count value or a sum.

我试过插入计算字段,但它只给出计数值或总和。

I want to calculate the Average Transaction value which is (Total Sales/No of bills)

我想计算平均交易价值,即(总销售额/账单数量)

回答by Martin Dreher

Actually, this should work with a calculated field as you described, provided you already got the no. of bills (this could either be a Countor a SumField, depending on your input data) and the amount of total sales in your PT.

实际上,这应该适用于您描述的计算字段,前提是您已经获得了否。账单(这可以是一个Count或一个Sum字段,取决于您的输入数据)和您的 PT 中的总销售额。

The Pic below is in German Excel 2010, however, this should still give you a pretty good idea on how to reporoduce the field

下面的图片是在德国 Excel 2010 中,但是,这仍然应该让您对如何重新生成该字段有一个很好的了解

enter image description here

在此处输入图片说明