Forum Discussion

garimajain85's avatar
garimajain85
Frequent Visitor
2 years ago
Solved

If Statement with Dates

Trying to add a column with If then statement: if [DOH]>= Date.IsInPreviousNDays([HR Data Received Date],180 ) then"Active"else"Inactive"   and reciving following error message: Expression.Error...
  • ManuelBolz's avatar
    2 years ago

    Hello garimajain85,

    the result from Date.IsInPreviousNDays([HR Data Received Date],180 ) is TRUE or FALSE.
    Next you try to calculate if [DOH] >= TRUE/FALSE then [...]

    I thing you want this
    if [DOH] >= Date.AddDays([HR Data Received Date], 180)
    then "Active"
    else "Inactive")