Reputation: 95
I'm try convert the formula bellow to Power BI M language
=IF(AC4>TIMEVALUE("20:00:00");"After the deadline";"In the term")
I tried formula bellow but doesn't work, it return this error message "The name 'IF' wasn't recognized. Make sure it's spelled correctly.":
=IF(
TIMEVALUE([#"(Transf1-Coleta)"]) > TIMEVALUE("20:00:00"),
"After the deadline",
"In the term"
)
The column [#"(Transf1-Coleta)"] is the same value of column "AC" and "AD" is the value that want get
Upvotes: 0
Views: 94
Reputation: 4346
In M
= Table.AddColumn(#PreviousStep, "Custom", each if DateTime.Time([Transf1-Coleta])>Time.FromText("20:00:00") then "After the Deadline" else"In the term")
Upvotes: 0
Reputation: 16908
if you are using Measure, try this below code-
=IF(
TIMEVALUE(min(table_name[column_name])) > TIMEVALUE("20:00:00"),
"After the deadline",
"In the term"
)
Upvotes: 1