[英]Power BI Code for filtering. Debugging Codes in M language ( Creating a column in Power BI)
我有错误请你帮忙,因为我是新来的
= Table.AddColumn(#"Changed Type", "Custom", each if ([Application Name] = "BBK" and (Text.Contains([Entitlement Key], "_ADMIN_BBK") or Text.Contains([Entitlement Key] , "_UPDATE_BBK") 或 Text.Contains([Entitlement Key], "_READ_BBK")) then "YES" else if [Application Name] = "CBJ" and (Text.Contains([Entitlement Key], "_ADMIN_CBJ") 或Text.Contains([Entitlement Key],"_UPDATE_CBJ") or Text.Contains([Entitlement Key],"_EXECUTE_CBJ") or Text.Contains([Entitlement Key],"_READ_CBJ")) then "YES" else if [Application Name] = "NEX" and Text.Contains([Entitlement Key], "_READ_NEX") then "YES" else if [Application Name] = "SNR" and Text.Contains([Entitlement Key], "_READ_SNR" ) then "是”否则“否”))))
很难说你在做什么,但试试
= Table.AddColumn(#"Changed Type", "Custom", each
if (
[Application Name] = "BBK" and (Text.Contains([Entitlement Key], "_ADMIN_BBK") or Text.Contains([Entitlement Key], "_UPDATE_BBK") or Text.Contains([Entitlement Key], "_READ_BBK"))) then "YES"
else if ([Application Name] = "CBJ" and (Text.Contains([Entitlement Key], "_ADMIN_CBJ") or Text.Contains([Entitlement Key],"_UPDATE_CBJ") or Text.Contains([Entitlement Key],"_EXECUTE_CBJ") or Text.Contains([Entitlement Key],"_READ_CBJ"))) then "YES"
else if [Application Name] = "NEX" and Text.Contains([Entitlement Key], "_READ_NEX") then "YES"
else if [Application Name] = "SNR" and Text.Contains([Entitlement Key], "_READ_SNR" ) then "YES"
else "NO"
)
我做了你应该做的 - 逐个尝试,确保在添加下一行之前评估每一行。 某些地方的括号太少,而其他地方的括号太多
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.