Informatica 中选定的列/行中有多少个 1?

发布于 2025-01-14 17:03:04 字数 245 浏览 1 评论 0原文

我对 Informatica 非常陌生。现在我想计算 Informatica 中选定行中有多少个 1,我们可以使用 COUNTIF 公式在 Excel 中轻松完成此操作。

例如,column1 - a,b,c,d ;第 2 列 - 1,2,1,4 ; column3 - 1,1,3,5

如何在 Informatica 中编写表达式来计算每行 (a,b,c,d) 有多少个 1?

I am very new to Informatica. Now I would like to Count how many 1's are there in selected row in Informatica, which we could do easily in excel using COUNTIF formula.

For example, column1 - a,b,c,d ; column2 - 1,2,1,4 ; column3 - 1,1,3,5

How to write expression in Informatica to calculate how many 1's are there in each row (a,b,c,d)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不…忘初心 2025-01-21 17:03:04

任何字符串的出现次数都可以这样计算 -

length(column1 ) - length(replacechr(column1,'1','')) 

取字符串的总长度,然后减去字符串中其他所有内容的长度。
使用exp转换并计算列column1、column2、column3...中有多少个1存在

occurrence of any string can be calculated like this -

length(column1 ) - length(replacechr(column1,'1','')) 

Take the total length of string and then minus length of everything else in the string.
Use an exp transformation and calculate how many 1 exist in column column1 ,column2,column3...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文