统计某一列中数值出现的次数。

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

Count how many instances the value in a column appears in that column

问题

ptnum virtual_column
123 3
123 3
222 1
123 3
英文:

I need to create a virtual column in APPSHEET that will return a count of how many times the value in [ptnum] appears in the data table column [ptnum]. I want it to return the number as value in the virtual column. I need an APP Formula
example

ptnum virtual_column
123 3
123 3
222 1
123 3

答案1

得分: 1

这个公式计算所有与此行的 ptnum 相等的条目数:

 SELECT(
  TABLE[ptnum],
  [ptnum] = [_THISROW].[ptnum]
 )
)```

<details>
<summary>英文:</summary>

This formula counts all entries where **ptnum** is equal to this rows **ptnum**:

    COUNT(
     SELECT(
      TABLE[ptnum],
      [ptnum] = [_THISROW].[ptnum]
     )
    )

</details>



huangapple
  • 本文由 发表于 2023年3月9日 21:53:07
  • 转载请务必保留本文链接:https://go.coder-hub.com/75685550.html
  • google-appsheet
匿名

发表评论

匿名网友

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

确定