2 Replies Latest reply on Mar 5, 2012 3:50 PM by philmodjunk

# Need better Day Calculations that don't give -numbers when set to "Inactive"

### Title

Need better Day Calculations that don't give -numbers when set to "Inactive"

### Post

I need better day calculations.  When status is set to inactive it gives me a number like this "-734541" This is the formula I'm using

"If(Status="Active"and IsEmpty(Date_Start) = 0; Get(CurrentDate)) - Date_Start + 1"  This counts there first day as 1 which i need.

When  Status is set to "Inactive" I would like it to stop counting and not display the negative #.  I need to leave the Start date in the field when set to Inactive for possible reference at a later time, so I cant just remove the date.  I also want to use the new formula fo other day calculations fields I'll just change the parameters.

"If(Status="Active"and IsEmpty(StartDate123 )= 0; Get(CurrentDate)) - StartDate123"

I have 10 total day counters

Date_Start, StartDateReading, StartDate123, StartDate4, StartDate5, StartDate6, StartDate7, StartDate89, StartDate101112, StartDateAll

Days, DaysReading, Days123, Days4, Days5, Days6, Days7, Days89, Days101112, DaysAll

I'm using the Days calculation results in Summary Average Fields to calculate the average of how many days the ACTIVE clients are in one of these areas.

• ###### 1. Re: Need better Day Calculations that don't give -numbers when set to "Inactive"

Alright, I figured a solution out.  I created a Flag_Staus_Days Field  If(Status="Active";Days)  I can use this result for my Average fields..

• ###### 2. Re: Need better Day Calculations that don't give -numbers when set to "Inactive"

Seems like you should use:

"If(Status="Active" and Not IsEmpty(Date_Start) ; Get(CurrentDate)) - Date_Start + 1)

Note that = 0 has been removed.

Don't see any way for status = "inactive" to produce a result with the above calculation once you modify it as shown.