基于条件的电源查询列
大家好,刚接触BI的刚接触BI,我在基于电源查询的条件下创建一列遇到了一些麻烦。
我正在尝试做一些事情,例如上一个字母是a,b或c,而当前的字母为e,f或g mark true,否则是错误的。
到目前为止,我的代码看起来像这样:
自定义列=
如果list.contains({“ a”,“ b”,“ c”}),[prectletter]
和list.contains({“ e”,“ f”,“ g”,“ g ”}),[字母]
然后“ true”
否则“ false”
输出将是如此之类的东西:
prectletter | 字母 | customcolumn |
---|---|---|
a | false | true |
x m | b false | b e true |
c | f | true true true |
true | 任何 | f |
帮助都非常感谢!
Hey guys new to Power BI here and I am having some trouble creating a column based on conditionals in Power Query.
I am trying to do something like if the previous letter was A,B,or C and the current letter is E,F,or G mark True, else False.
My code looks like this so far:
Custom Column =
IF List.Contains({“A”, “B”,”C”}), [PrevLetter]
AND list.Contains({“E”, “F”, ”G”}) , [Letters]
THEN “TRUE”
ELSE “FALSE”
Output would be so something like:
PrevLetter | Letter | CustomColumn |
---|---|---|
A | F | True |
X | M | False |
B | E | True |
C | F | True |
Any help is truly appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
答案取决于您是否正在寻找单词中的字母,或者该字母是否代表整个文本,但是就您的
示例
而
The answer depends on if you are looking for a letter within a word, or if that letter represents the entire text, but for your example, one answer could be
or if you want to plan around nulls
or