在TM1规则中的Excel中的COUNTIF等价函数是什么?

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

Equvialent of countif in excel within a tm1 rule?

问题

我想要统计包含 'EVET' 字符串关键词的单元格,通过下面的图片

并将每个月的数字分别粘贴到下面的图片中

英文:

I want to count cells that include 'EVET' string keyword via below's picture

在TM1规则中的Excel中的COUNTIF等价函数是什么?

and paste number of each month into each month, respectively to below's picture

在TM1规则中的Excel中的COUNTIF等价函数是什么?

在TM1规则中的Excel中的COUNTIF等价函数是什么?

答案1

得分: 0

需要在“v_planning 02”立方体的“v_measure”维度中添加一个额外的(数值)度量。例如,我将其称为“EVET计数”。

然后,在“v_planning 02”立方体中添加以下规则:

['v_measure':'evet count']=N: If ( DB ( 'v_planning 02', !v_months, !v_row, 'Achieved' ) @= 'EVET', 1, 0 );

你将希望在此立方体中启用skipcheck,然后将来自合适位置的“EVET Count”度量输入,以便它正确合并。

因为“v_row”在你的“v_key performance indicator”立方体中不存在,所以你需要在“v_planning 02”立方体中汇总计数。为此,你需要在“v_row”维度中有一个已合并的元素,我假设你有一个叫做“Total”的元素。
在“v_key performance indicator”立方体中,你的规则将如下:

['v_revenue':'Total Achieved']=N: DB ( 'v_planning 02', !v_months, 'Total', 'EVET Count' );
英文:

You will need to add an additional (numeric) measure into the v_measure dimension in the "v_planning 02" cube. For the example, I will call it "EVET Count"

You then add a rule in the "v_planning 02" cube as below:

['v_measure':'evet count']=N: If ( DB ( 'v_planning 02', !v_months, !v_row, 'Achieved' ) @= 'EVET', 1, 0 );

You will want to have skipcheck enabled in this cube and then feed to the "EVET Count" measure (from somewhere sensible) so that it consolidates up correctly.

Because v_row does not exist in your "v_key performance indicator" cube; you need to sum up the count in the "v_planning 02" cube instead. To do this you will need to have a Consolidated element in the v_row dimension, I will assume you have one called "Total".
In the "v_key performance indicator" cube your rule would then be:

['v_revenue':'Total Achieved']=N: DB ( 'v_planning 02', !v_months, 'Total', 'EVET Count');

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

发表评论

匿名网友

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

确定