[英]Distinct rows on Pivot Table
I'm trying to display data with a pivot table with a distinct of rows我正在尝试使用具有不同行的 pivot 表显示数据
Data数据
Id | Date | Count | Date 2 | ...
1 | 21/02/2020 | 1 | | ...
1 | 21/02/2020 | 1 | 21/02/2020 | ...
2 | 15/05/2021 | 0 | 15/05/2021 | ...
3 | 17/09/2020 | 2 | 17/09/2020 | ...
3 | 17/09/2020 | 2 | 19/10/2021 | ...
3 | 17/09/2020 | 2 | 25/11/2021 | ...
Expected result in the Pivot Table Pivot 表中的预期结果
Id | Date | Count
1 | 21/02/2020 | 1
2 | 15/05/2021 | 0
3 | 17/09/2020 | 2
Can you please explain me quickly how to setup the Pivot Table to get this result?您能否快速解释一下如何设置 Pivot 表以获得此结果?
Indeed, I'm getting 2 for id 1
and 6 for id 3
... SUM
is performed (instead of 1 and 2).事实上,我得到 2 用于id 1
和 6 用于id 3
...执行SUM
(而不是 1 和 2)。
Moreover, I'm not able to put the value of the Date
as a column...此外,我无法将Date
的值作为列...
Maybe that Pivot Table is not the correct way to do it.也许 Pivot 表不是正确的方法。
I hope it is clear...我希望它是清楚的...
Many thanks in advance提前谢谢了
Just adding the answer per the comment..只需根据评论添加答案..
To achieve your Expected result, you can use a pivot table where you put those 3 fields in your "rows" value.为了达到您的预期结果,您可以使用 pivot 表,将这 3 个字段放在“行”值中。 Then change your design to Tabular mode, do not show Grand or Sub totals.然后将您的设计更改为表格模式,不要显示总计或小计。
You could also simply copy those 3 columns, and paste elsewhere, then with all 3 columns highlighted do to Data and remove duplicates.您也可以简单地复制这 3 列,然后粘贴到其他位置,然后突出显示所有 3 列,对数据执行并删除重复项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.