0

在我的 ODBC Excel 文件中,我设置了一个包含 3 层的数据透视表:Bin、StockCode、Date。并且 NoOfDays 作为值(始终为每天 1 个/stockcode/bin 组合),第 1 层和第 3 层应该是总和,第 2 层应该恢复最大值。这可能吗

这是出于对仓库存储的计费目的,它需要层次结构来向下钻取,但不应将每个代码视为另一个值,而应仅报告特定箱中所有代码的最大值。

这是一些细节:

Bin StockCode   SaveDate    NoOfDays
10001A  SANK1318    2019-03-10  1
10001A  SANK1320    2019-03-10  1
10001A  SANK1318    2019-03-11  1
10001A  SANK1320    2019-03-11  1
10001A  SANK1318    2019-03-12  1
10001A  SANK1320    2019-03-12  1
10001A  SANK1318    2019-03-13  1
10001A  SANK1320    2019-03-13  1
10001A  SANK1318    2019-03-14  1
10001A  SANK1320    2019-03-14  1
10001A  SANK1318    2019-03-15  1
10001A  SANK1320    2019-03-15  1
10001A  SANK1318    2019-03-16  1
10001A  SANK1320    2019-03-16  1
10001A  SANK1318    2019-03-17  1
10001A  SANK1320    2019-03-17  1
10001A  SANK1318    2019-03-18  1
10001A  SANK1320    2019-03-18  1
10001A  SANK1318    2019-03-19  1
10001A  SANK1320    2019-03-19  1
10001A  SANK1318    2019-03-20  1
10001A  SANK1320    2019-03-20  1
10001A  SANK1318    2019-03-21  1
10001A  SANK1320    2019-03-21  1
10001A  SANK1318    2019-03-22  1
10001A  SANK1320    2019-03-22  1
10001A  SANK1318    2019-03-23  1
10001A  SANK1318    2019-03-24  1
10001A  SANK1318    2019-03-25  1
10001A  SANK1313    2019-03-26  1
10001A  SANK1318    2019-03-26  1
10001A  SANK1313    2019-03-27  1
10001A  SANK1318    2019-03-27  1
10001A  SANK1313    2019-03-28  1
10001A  SANK1318    2019-03-28  1
10001A  SANK1313    2019-03-29  1
10001A  SANK1314    2019-03-29  1
10001A  SANK1318    2019-03-29  1
10001A  SANK1313    2019-03-30  1
10001A  SANK1314    2019-03-30  1
10001A  SANK1318    2019-03-30  1
10001A  SANK1313    2019-03-31  1
10001A  SANK1314    2019-03-31  1
10001A  SANK1318    2019-03-31  1
10001B  SANK1323    2019-03-10  1
10001B  SANK1323    2019-03-11  1
10001B  SANK1323    2019-03-12  1
10001B  SANK1323    2019-03-13  1
10001B  SANK1323    2019-03-14  1
10001B  SANK1323    2019-03-15  1
10001B  SANK1323    2019-03-16  1
10001B  SANK1323    2019-03-17  1
10001B  SANK1323    2019-03-18  1
10001B  SANK1323    2019-03-19  1
10001B  SANK1323    2019-03-20  1
10001B  SANK1323    2019-03-21  1
10001B  SANK1323    2019-03-22  1
10001B  SANK1323    2019-03-23  1
10001B  SANK1323    2019-03-24  1
10001B  SANK1323    2019-03-25  1
10001B  SANK1321    2019-03-26  1
10001B  SANK1323    2019-03-26  1
10001B  SANK1321    2019-03-27  1
10001B  SANK1323    2019-03-27  1
10001B  SANK1321    2019-03-28  1
10001B  SANK1323    2019-03-28  1
10001B  SANK1321    2019-03-29  1
10001B  SANK1323    2019-03-29  1
10001B  SANK1321    2019-03-30  1
10001B  SANK1323    2019-03-30  1
10001B  SANK1321    2019-03-31  1
10001B  SANK1323    2019-03-31  1

以下是当前显示的内容(未扩展到日期级别)

Row Labels  Number Of Days
-10001A         44
  +SANK1313     6
  +SANK1314     3
  +SANK1318     22
  +SANK1320     13
-10001B         28
  +SANK1321     6
  +SANK1323     22

我要求:

the Dates(not shown here) to sum on the Codes tier (i.e. 'SANK1313' should be 6 as per illustration) 
The Codes to Max on the Bin tier(i.e. '10001A' should return 22 and '10001B' should return 22)
the Bins to Sum in the grand total

这里的问题是更改字段值属性会更改所有层的所有值计算

4

0 回答 0