gpt4 book ai didi

google-sheets - 尝试获取数据透视表中子类别的大小(以 % 为单位)

转载 作者:行者123 更新时间:2023-12-05 09:35:33 27 4
gpt4 key购买 nike

我在 Google 表格中跟踪我的(股票)投资组合,如下所示:

category     subcategory    company  amount
-------------------------------------------
health care diagnostics AA 100
health care diagnostics AB 50
materials mining BA 75
financials banks CA 30
financials insurers CB 35
financials banks CC 10
financials banks CD 40
financials hedge fund CE 5
health care equipment DA 50

但现在我想从中提取一些统计数据,我正在使用 Pivot。具体来说,我想看看:

  • 投资组合中每个类别的相对大小
  • 投资组合中每个子类别的相对大小
  • 每个公司在其子类别中的相对规模

我完成的前两个:

enter image description here

例如,我可以看到:

  • 类别金融在投资组合中的相对规模为30%
  • 子类别诊断在投资组合中的相对规模为37.97%

然而,缺少的是第三列,请参见下面的模型:

enter image description here

我现在可以在最后一列中看到每个 company 在其 subcategory 中的相对规模:

  • 公司 CD 是子类别 banks50%
  • AB 公司是 300.33% 子类别 diagnostics

然而,最后一列不是计算出来的,而是手动添加的,以显示我试图获得但无法获得的输出。

有谁知道如何将最后一列作为数据透视表的一部分?

这里是所用 Google 表格的链接:Pivot

最佳答案

目前,Google 表格中没有% by subtotal 选项来显示整个数据透视表的小计百分比:

enter image description here

作为解决方法,您可以通过过滤数据透视表以仅显示一个子类别来显示小计百分比,例如:

在此处添加过滤器并选择子类别:

enter image description here

然后选择所需的字段,例如banks,然后单击“确定”。

enter image description here

这应该像这样显示小计百分比:

enter image description here

注意:您可以删除 Rows 中的 category 字段,使数据透视表更干净。

您还可以向 Google Workspace 提交功能创意请求,请参阅本网站上的说明:Submit ideas for Google Workspace and Cloud Identity

关于google-sheets - 尝试获取数据透视表中子类别的大小(以 % 为单位),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65789400/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com