Power BI 自定义组合列 Text.Combine 和嵌入式条件导致插入不同的字符串

PowerBI custom combined column with Text.Combine and with embeded conditions leading to the insertion of different strings

我在 PowerBI 中创建了一个自定义列,用于连接列。

我有以下内容:

Text.Combine({[Nip],[Nap],[Noup]]},"_")

但是,我想要一个特定的文本,它会根据列中是否存在数据而变化。我需要检查四列中是否有数据。如果有数据,则插入特定的字符串,如果没有,则不插入任何数据。

我正在尝试插入“IF”的结果,但有些复杂,我试过了,但这不起作用,Power BI 告诉我“预期的令牌 Eof”:

If [Lapino] <> null or [Lapinou] <> null or [Werwolf] <> null or [Ciocolato] then 

Text.Combine({[Nip],"Snoubadiuba",[Nap],[Noup]},"_")

else Text.Combine({[Nip],"BruttoCativo",[Nap],[Noup]},"_")

我相信这就像将 If 更改为小写 if 一样简单。 M代码区分大小写