Skip to main content

I am having a hard time configuring a formula that logically is "If {Date MWS Completed} was between 60 and 30 days ago, then display difference between start date and completion date, otherwise, show a blank. This is what I have and I can’t figure out why it won’t work


IF(

AND(

IS_AFTER({Date MWS Completed},DATEADD(TODAY(), -60, ’days’),

IS_BEFORE({Date MWS Completed},DATEADD(TODAY(), -30, ’days’),

), DATETIME_DIFF({Status Complete}, Info, ‘weeks’), “ ”)


Any help is appreciated!

Hi @Troy_Panehal and welcome back to the community!


This formula works:



IF(AND(DATETIME_DIFF({Date MWS Completed}, TODAY(), “days”)<-30, DATETIME_DIFF({Date MWS Completed}, TODAY(), “days”)>-60), DATETIME_DIFF({Status complete}, info, “weeks”))



As I understand it, “info” is your starting date, “status complete” your end date and “Date MWS Completed” the date that is used for the condition.


IS_AFTER and IS_BEFORE only checks if 1 date is before/after the other. It can’t output “days”. It doesn’t work in combination with DATEADD. You need to use logical operators for that.


Hi @Troy_Panehal and welcome back to the community!


This formula works:



IF(AND(DATETIME_DIFF({Date MWS Completed}, TODAY(), “days”)<-30, DATETIME_DIFF({Date MWS Completed}, TODAY(), “days”)>-60), DATETIME_DIFF({Status complete}, info, “weeks”))



As I understand it, “info” is your starting date, “status complete” your end date and “Date MWS Completed” the date that is used for the condition.


IS_AFTER and IS_BEFORE only checks if 1 date is before/after the other. It can’t output “days”. It doesn’t work in combination with DATEADD. You need to use logical operators for that.


Thanks for the response! I actually figured out how to achive what I am trying to do in another View using filters.


Have a good one!


Reply