如何把这个公式从excel转换成M语言?

How to convert this formula from excel to M language?

我正在尝试将下面的公式转换为 Power BI M 语言

=IF(AC4>TIMEVALUE("20:00:00");"After the deadline";"In the term")

我尝试了下面的公式但没有用,它 return 这条错误消息“无法识别名称 'IF'。确保拼写正确。”:

=IF(
TIMEVALUE([#"(Transf1-Coleta)"]) > TIMEVALUE("20:00:00"),
"After the deadline",
"In the term"
)

[#"(Transf1-Coleta)"] 列与“AC”列的值相同,“AD”是要获取的值

如果您正在使用 Measure,试试下面的代码-

=IF(
    TIMEVALUE(min(table_name[column_name])) > TIMEVALUE("20:00:00"),
    "After the deadline",
    "In the term"
)

中号

= Table.AddColumn(#PreviousStep, "Custom", each if DateTime.Time([Transf1-Coleta])>Time.FromText("20:00:00") then "After the Deadline" else"In the term")