I have a Picklist Status__c, and Status_change_date__c(date field) its value gets updated when the picklist value is changed, this happens through Process Builder.
I need to Calculate No. of days a status has stayed in excluding weekends. So I have created a Formula field Days_InProcess__c (Number)
IF(
ISPICKVAL(Status__c, 'InProcess') ,
((5 * (FLOOR((TODAY() - DATE( 1900, 1, 8))/7)) + MIN(5, MOD(TODAY() - DATE(1900, 1, 8), 7)))
-
(5 * (FLOOR(( status_change_date__c - DATE(1900, 1, 8))/7)) + MIN(5, MOD(status_change_date__c - DATE(1900, 1, 8), 7))))
,
0)
It's updating perfectly. But when I change the Picklist to some other value automatically this field changes to 0 as I have mentioned in the IF condition. Is there any way that the value does not change and stays the same if Picklist value is updated to some other value. Thanks.