From the Bus Obj. User application, can you create a column and define a
formula with multiple ìifî statements? I have tried 2 ways: 1) Make each ìIFî statement a separate variable and try to combine them in the formula and 2) Write out all the ìIFî statements somehow trying to either nest them or use ìORî.
If specifics will help, I already have a number of complex formulas to convert a date to a datecode (datecode=a 3-digit number YWW) (WW=week number of the year, Y = last digit of the year i.e. 8 from 1998). Included in the formula is this conversion plus subtracting an older datecode from it. All this is defined as a variable and works fine.
I have constructed a field called YEARFILTER which subtracts only the 1st digit (the Y) between the 2 datecodes. If the Y=1, then I need to subtract 48 from the final result in order to show actual delta between years. For example, the difference in weeks between 905 and 850 is not 55 weeks as a straight subtraction would indicate. It is really 7 weeks. Hence, if Y=1 than I would need to subtract 48 from the final result and if Y=2 I would need to subract 96 from the final result, etc.
The formula I am gunning for is one that will say: Look at the YEARFILTER variable. If it equals 1, then subtract 48 from the FINALDELTA variable in that record. If it equals 2, then subtract 96 from the FINALDELTA variable. If it equals 3 subtract 144 from the FINALDELTA variable. Otherwise the result = FINALDELTA. (NOTE: FINALDELTA is the straight subtract between the 2 datecodes)
My futile attempts are below: (as you can see, I am new at this) Simplified (only 2 conditions for trying to figure this out) =If (( = 1) (if = 2 then - 96 else <finaldeltarev))) Then ( -48) Else <finaldeltarev
or --define the sub-if statements as variables and somehow combine them in the formula
=If ( = 1) Then ( -48) is variable and
=If ( = 2) Then ( -96) is variable etc.
You-all have bailed me out several times already. If anyone can tackle this, I would be very grateful.
–Beverly
B e v e r l y M c D o w e l l
Product Assurance
Listserv Archives (BOB member since 2002-06-25)