在透视表中的不同计数添加了 “空” 到透视表。

huangapple go评论63阅读模式
英文:

Distinct count in pivot adds 'empty' to pivot

问题

我很高兴发现数据透视表中有一个不同计数的选项。我使用它,但发现了一些我无法解释的情况:

当我使用普通的count命令时,我得到一个漂亮的、整洁的表格,其中包含了所有的值(在这种情况下)。我检查了单元格,我已经填充了所有的空单元格:

在透视表中的不同计数添加了 “空” 到透视表。

但当我切换到unique count时,突然之间表格中的值之间出现了一个'empty'。但只有1个:

在透视表中的不同计数添加了 “空” 到透视表。

我检查了数据,值之间没有空白。当我选择列,使用'前往' > '特殊' > '空单元格'时,我收到这个消息:

在透视表中的不同计数添加了 “空” 到透视表。

'未找到单元格'。

为什么在使用唯一计数选项时会发生这种情况?

我检查了数据范围的末尾(选择最后一个填充的行:ctrl + 向下箭头)在我的文件中:

在透视表中的不同计数添加了 “空” 到透视表。

这是包含在第1行的列标题的文件。

当我将其与Powerpivot进行比较(选择最后一行,ctrl + 向下箭头),我发现Powerpivot范围在第369692行结束,而这应该是369691行(列标题不再在第1行):

在透视表中的不同计数添加了 “空” 到透视表。

现在我唯一能想到的是,我看到Powerpivot显然是按照4行一组的方式工作,其中最后一组的最后一行是空的:

在透视表中的不同计数添加了 “空” 到透视表。

当我在Powerpivot中对特定列进行'空'筛选时,我得到了这个:

在透视表中的不同计数添加了 “空” 到透视表。

行号很奇怪,因为第1行通常是填充的:

在透视表中的不同计数添加了 “空” 到透视表。

但仍然,当数据范围中没有空行时,Powerpivot如何找到一个空行呢?

英文:

I was happy to find out there is an option for a distinct count in pivottables.
I used it, but found out something happened which I cannot explain:

When I use the normal count command, I get a nice, decent table containing all the values in the (in this case) column. I checked the cells, I have filled all the empty cells with a value:

在透视表中的不同计数添加了 “空” 到透视表。

but when I switch to unique count, suddenly the table has an 'empty' between the values. But only 1:

在透视表中的不同计数添加了 “空” 到透视表。

I checked the data, there is no empty between the values. When I select the column, use 'go to' > 'special' > 'empty cells' I get this message:
在透视表中的不同计数添加了 “空” 到透视表。

'No cells found'.

Why does this happen when using the unique count option?

I check the end of the data range (select the last filled row: ctrl + arrow down) in my file:
在透视表中的不同计数添加了 “空” 到透视表。

this is the file with the column headers in row 1.

When I compare this to Powerpivot (select the last row, ctrl + arrow down), I see the Powerpivot range ends in row 369692 while this should be 369691 (the column headers are not in row 1 anymore):
在透视表中的不同计数添加了 “空” 到透视表。

The only thing I can come up with now is that I see powerpivot works with blocks of 4 rows apparently, where the last row in the last block is empty:

在透视表中的不同计数添加了 “空” 到透视表。

When I filter the specific column in Powerpivot on 'Empty', I get this:
在透视表中的不同计数添加了 “空” 到透视表。

The row number is strange because row 1 is filled normally:
在透视表中的不同计数添加了 “空” 到透视表。

But still, how does Powerpivot find an empty row in the data range when there is no empty row?

答案1

得分: 0

可能的原因及解决方法

  • 数据中存在隐藏字符或空格,导致出现(空白)值。使用TRIM函数可以移除它们。

  • 数据源或与数据源的连接出现问题。您可以尝试刷新数据源,看看是否解决了问题。

  • 数据源中的占位行可能导致在透视表中使用唯一计数函数时出现(空白)值。如果数据源中存在一个包含空单元格或带有隐藏字符或空格占位行,它可能会被唯一计数函数计算为唯一值

英文:

Possible causes with solutions

  • hidden characters or spaces in the data that are causing the (blank) value to appear. using the TRIM function will remove them

  • Issue with the data source or the connection to the data source. You can try refreshing the data source and see if that resolves the issue.

  • placeholder row in your data source could be causing the (blank) value to appear when using the Distinct Count function in a pivot table. If there is a placeholder row in your data source that contains empty cells or cells with hidden characters or spaces, it could be counted as a unique value by the Distinct Count function.

huangapple
  • 本文由 发表于 2023年6月8日 15:57:33
  • 转载请务必保留本文链接:https://go.coder-hub.com/76429766.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定