6 Replies Latest reply on Mar 20, 2009 12:43 PM by snkm

# Calculation Problem

### Title

Calculation Problem

### Post

Depening on the date entered into "FIELD A" I would addtional text entered into 'FIELD B".

Example FIELD A = 2/21/2009 therefore FIELD B = 09 QTR 1

Here is my calculation for FIELD B that does not seem to be working:

If(FIELD A>12/31/2007 and FIELD A<04/01/2008;"08 QTR 1";
If(FIELD A>03/31/2008 and FIELD A<07/01/2008;"08 QTR 2";
If(FIELD A>06/30/2008 and FIELD A<10/01/2008;"08 QTR 3";
If(FIELD A>09/30/2008 and FIELD A<01/01/2009;"08 QTR 4";
If(FIELD A>12/31/2008 and FIELD A<04/01/2009;"09 QTR 1";
If(FIELD A>03/31/2009 and FIELD A<07/01/2009;"09 QTR 2";
If(FIELD A>06/30/2009 and FIELD A<10/01/2009;"09 QTR 3";
If(FIELD A>09/30/2009 and FIELD A<01/01/2010;"09 QTR 4";""))))))))

• ###### 1. Re: Calculation Problem

Pasting a field definition from one of my own files:

Choose(Int((Month(Date)-1)/3); "First "; "Second "; "Third ";"Fourth " ) & "Quarter, " & Year(Date)

The text returned is different, but you should be able to edit that part to get what you want.

PS. Your calc should work if you enclosed the literal dates in GetasDate() functions.

• ###### 2. Re: Calculation Problem
BTW, you could simply format another instance of FIELD A to display as "09 Q1" or "09 1st Quarter".
• ###### 3. Re: Calculation Problem

Yep,

Comment is correct. Of course if you need the value to function as a key field in a relationship, you'll still probably need a calculation.

• ###### 4. Re: Calculation Problem
What do you mean by format?
• ###### 5. Re: Calculation Problem
See here.
• ###### 6. Re: Calculation Problem
Nevermind I'm a blonde and I figured it out.