Sumifs 到数据透视表(Excel 2016)

Sumifs to Pivot Tables (Excel 2016)

我目前的职责是维护和更新在 Excel 中创建的报告。我正在清理仪表板的源表。

我想根据下面的 table 创建一个枢轴 table:

Record (A) | Created_Month (B) | Report_Month (C)
Entry 1    | Feb-17            | May-17
Entry 2    | Mar-17            | May-17
Entry 3    | Apr-17            | May-17
Entry 4    | May-17            | May-17
Entry 5    | May-17            | May-17
Entry 6    | May-17            | Jun-17
Entry 7    | Apr-17            | Jun-17
Entry 8    | Jan-17            | Jun-17
Entry 9    | Feb-17            | Jun-17
Entry 10   | May-17            | Jun-17
Entry 11   | Jun-17            | Jun-17
Entry 12   | Jun-17            | Jun-17

因此我们收到一个 Excel 文件,其中包含与上述类似的数据 table。我只需要报告在与报告月份相同的月份创建的条目数。因此,例如,对于 Jun-17,创建了 2 个条目。使用 COUNTIFS,可以提取此数据,但我想在 Pivot tables 中以 Reporting_Month 作为列进行提取。有什么建议么?

为了稳健,使用 Insert > Table 或 Ctrl-T 将原始数据转换为 Excel Table 对象。然后,选中任何 table 单元格,单击插入 > 透视Table。将 Report Month 字段拖到 Rows 区域,并将 Record 字段拖到 values 中,因为它是文本,所以默认为 Count。

评论后编辑:在您的数据源中添加一列,其中包含一个公式,用于检查两个月是否相同以及 return 正确的值。然后将该列用作数据透视表 table.

中的过滤器