Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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: We cannot apply operator < to types Logical and Date.
Details:
Operator=<
Left=FALSE
Right=2/15/2021
Solved! Go to Solution.
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")
Hello,
I am wanting to make a custom column that tells me if a customer order date exceeds a certain # of days past production end. I.E If Column X >=7+ days of column y, return "contact ae" or if false "in window". Here is what i tried and no luck. Any ideas how to write this out in DAX?
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")