按单元格引用的业务对象CountIf [英] Business Objects CountIf by cell reference

查看:90
本文介绍了按单元格引用的业务对象CountIf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一列包含这些数据

So I have a column with this data

1
1
1
2
3
4
5
5
5

如果上表中任何给定位置的值等于我选择的单元格,我该如何计数?即执行 Count([NUMBER])where([NUMBER] = Coordinates(0,0))将返回3,因为存在3行,其中值是1 0位。

how can I do a count if where the value at any given location in the above table is equal to a cell i select? i.e. doing Count([NUMBER]) Where([NUMBER] = Coordinates(0,0)) would return 3, because there are 3 rows where the value is one in the 0 position.

基本上就像在excel中一样,您可以执行 COUNTIF(A:A,1)将为您提供 A:A 中的值为1的行总数。在业务对象Web智能中可以这样做吗?

it's basically like in excel where you can do COUNTIF(A:A, 1) and it would give you the total number of rows where the value in A:A is 1. is this possible to do in business objects web intelligence?

推荐答案

WebI中的功能在行上运行,因此您必须有所不同。

Functions in WebI operate on rows, so you have to think about it a little differently.

如果要在报表块之外创建一个单元格并显示特定值的计数,则可以将 Count() Where()

If your intent is to create a cell outside of the report block and display the count of specific values, you can use Count() with Where():

=Count([NUMBER];All)  Where ([NUMBER] = "1")

在独立式单元格中,上面的值将为样本数据为 3。

In a freestanding cell, the above will produce a value of "3" for your sample data.

如果要将结果放在同一块中并让其计算该行中出现的值,例如:

If you want to put the result in the same block and have it count up the occurrences of values on that row, for example:

NUMBER    NUMBER Total
1         3
1         3
1         3
2         1
3         1
4         1
5         3
5         3
5         3

变得有点复杂。您必须在查询中至少有其他一个维度才能引用。可以是任何东西,但您必须结合NUMBER维来计算某物。因此,假设查询中还有一个名为 [Duh] 的维度,那么以下代码将起作用:

it gets a little more complicated. You have to have at least one other dimension in the query to reference. It can be anything, but you have to be counting something in conjunction with the NUMBER dimension. So, the following would work, assuming there's another dimension in the query named [Duh]:

=Count([NUMBER];All)  ForAll([Duh])

这篇关于按单元格引用的业务对象CountIf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆