Forum Discussion
- QuickBaseCoachDQrew CaptainThe IF conditions are evaluated in the sequence in your formula. So for starters you need to test for the larger values first and then work your way down to the smaller values.
If(
not IsNull([Started]),"NA",
[Active Dif Calc]>7,"LT7",
[Active Dif Calc]>1,"LT1")
Note that is not necessary to clutter up your formula with extra brackets. It just makes it harder to read.
I do not know what type of field
[Active Dif Calc]
So I don�t know for sure if that formula will work. - KatrinaEQrew CadetIt worked! I have another thing to add to this though. I'm trying to add a formula to this existing formula that will yield a value of "E1", if the start date which is a date/time field is less than one day away. I tried to use ">" but it's not allowed for date time field.
- QuickBaseCoachDQrew CaptainMaybe this is what you want
If(
not IsNull([Started]),"NA",
[Active Dif Calc]>7,"LT7",
[Active Dif Calc]>1,"LT1",
Now()-[Start Date] < Hours(24), "E1")- KatrinaEQrew CadetThis just yields a result of �NA�. What I failed to include in this is that I wanted NA if the project has started on time. Right now it only yields NA because the project�s �Started� field is not null even if the project has been started late.
- QuickBaseCoachDQrew CaptainPlease post the formula for
[Active Dif Calc] - KatrinaEQrew Cadet(ToDays(ToDate([Started]) - ToDate([Start])))
- QuickBaseCoachDQrew CaptainPerhaps it is mainly the sequence if the logic checks which is the problem. But before I can answer we seem to have three fields and I'm not understanding the difference.
[Start Date]
[Start]
[Started]- KatrinaEQrew CadetSorry about that, I just changed the field names. I just have Start and Started. Start is the assigned start date and started is when they actually started the project
- QuickBaseCoachDQrew CaptainCan you please say the logic that you want in words and then I can convert that to a formula. Please start with 7 days late and then 1 day late and then on time and then early and then not started to be sure to cover all time periods from late to early.
- KatrinaEQrew CadetSo I want a field that will tell me if a task has been started or not on time. I want it to yield a result that will say "NA" if Active Dif Calc is equal to 0, and then if Active dif Calc is less than 7 days but not equal to 1 it will say "L7". And then if it is less than 1 day, it will say "L1". Start and Started are both date/time fields.
And if possible, I want to add E1 if the difference between start and started dates are less than 24 hours.
I hope that makes sense. I've been trying to figure this out but no luck
- QuickBaseCoachDQrew CaptainTry this version
If(
IsNull([Started]) and Today() < [Start], "Past Start date but not started,
[Active Dif Calc]>=7,"LT7",
[Active Dif Calc]>=1,"LT1",
[Active Dif Calc]=0, "N/A")
You have asked for the result to be "N/A" if the date that the job was started was equal to the date the job was supposed to start, and then also asked to have it read E1 if the job was started a few hours early but that could be on the same day as it was supposed to start, so that would calculate to "N/A".
ie the N/A and E1 logic you have asked for does not make sense to me. You may have to illustrate with an example.- KatrinaEQrew CadetRight now, it's showing these results LT7 shows up if a number is greater than 7
- QuickBaseCoachDQrew CaptainIf(
IsNull([Started]) and Today() < [Start], "Past Start date but not started,
[Active Dif Calc] <7 and [Active Dif Calc]>1,"LT7",
[started]-[start] > hours(0) and [started]-[start] < Hours(24), "L1",
[Active Dif Calc]=0, "N/A") - KatrinaEQrew CadetFor this part of the formula If(
IsNull([Started]) and Today() < [Start], the "<" won't work because the fields are date/time