i used below Custom Column in power BI , But there is always an error:’,’expected. I cannot fine where to put this “,”
<code>if [Notification to BET Team] = "No"
and not Text.Contains([Master budget grid], "pending")
and not Text.Contains([Payment schedule language], "pending")
and Text.Contains([Systems Alignment Template Review], "clinical") then
"Pending SAT submission"
else if [Notification to BET Team] = "No"
and not Text.Contains([Master budget grid], "pending")
and not Text.Contains([Payment schedule language], "pending")
and Text.Contains([Systems Alignment Template Review], "contract") then
"Pending templates"
else
null
</code>
<code>if [Notification to BET Team] = "No"
and not Text.Contains([Master budget grid], "pending")
and not Text.Contains([Payment schedule language], "pending")
and Text.Contains([Systems Alignment Template Review], "clinical") then
"Pending SAT submission"
else if [Notification to BET Team] = "No"
and not Text.Contains([Master budget grid], "pending")
and not Text.Contains([Payment schedule language], "pending")
and Text.Contains([Systems Alignment Template Review], "contract") then
"Pending templates"
else
null
</code>
if [Notification to BET Team] = "No"
and not Text.Contains([Master budget grid], "pending")
and not Text.Contains([Payment schedule language], "pending")
and Text.Contains([Systems Alignment Template Review], "clinical") then
"Pending SAT submission"
else if [Notification to BET Team] = "No"
and not Text.Contains([Master budget grid], "pending")
and not Text.Contains([Payment schedule language], "pending")
and Text.Contains([Systems Alignment Template Review], "contract") then
"Pending templates"
else
null
i tried to put “,” in the red coloured Error place, then this error continue to next logic word “els if”.
You need to wrap the Text.Contains with not and some ( ) are misplaced :
<code>if [Notification to BET Team] = "No"
and not Text.Contains([Master budget grid], "pending")
and not Text.Contains([Payment schedule language], "pending")
and Text.Contains([Systems Alignment Template Review], "clinical") then
"Pending SAT submission"
else if [Notification to BET Team] = "No"
and not Text.Contains([Master budget grid], "pending")
and not Text.Contains([Payment schedule language], "pending")
and Text.Contains([Systems Alignment Template Review], "contract") then
"Pending templates"
else
null
</code>
<code>if [Notification to BET Team] = "No"
and not Text.Contains([Master budget grid], "pending")
and not Text.Contains([Payment schedule language], "pending")
and Text.Contains([Systems Alignment Template Review], "clinical") then
"Pending SAT submission"
else if [Notification to BET Team] = "No"
and not Text.Contains([Master budget grid], "pending")
and not Text.Contains([Payment schedule language], "pending")
and Text.Contains([Systems Alignment Template Review], "contract") then
"Pending templates"
else
null
</code>
if [Notification to BET Team] = "No"
and not Text.Contains([Master budget grid], "pending")
and not Text.Contains([Payment schedule language], "pending")
and Text.Contains([Systems Alignment Template Review], "clinical") then
"Pending SAT submission"
else if [Notification to BET Team] = "No"
and not Text.Contains([Master budget grid], "pending")
and not Text.Contains([Payment schedule language], "pending")
and Text.Contains([Systems Alignment Template Review], "contract") then
"Pending templates"
else
null