Calculated field producing possible 4 different results

Joined
May 7, 2008
Messages
3
Reaction score
0
I need help with the syntax in a calculated field. I will give you an example of what I am trying to accomplish.

Yes and Out of State $9,000 result in field $9,000
No and Out of State $6,500 result in field $6,500
No and In State $5000 result in field $5,000
Yes and In State $7,500 result in field $7,500

Result: IIf([y/nField]=-1,[InStateAndYes],[InStateAndNo]) And (IIf([y/nField]=0,[OutStateYes],[OutStateNo]))

The [InStateAndYes] is a field in the table which contains 7500, similarly the other fields contain:
[InStateAndNo]=5000
[OutStateAndYes]=9000
[OutStateAndNo]=6500

Can this be done?

Thanks for your time.
 
Joined
May 7, 2008
Messages
3
Reaction score
0
Ok, got it all worked out just in case someone might have the same problem.

My fields are:
[InStateAndYes]=7500
[InStateAndNo]=5000
[OutStateAndYes]=9000
[OutStateAndNo]=6500
And the Yes and No field is called [D24]
Also I have a field that is a [P_Services Deployment Status]….for “In State” and “Out State”
What I was trying to accomplish is if the user selects “Yes” and “In State” it will return a value of $7,500, “Yes” and “Out State” it will return a value of $9,000, “No” and “In State” it will return a value of $5,000, “No” and “Out State” it will return a value of $6,500

The answer is:
Result: IIf([D24]=-1,IIf([P_Services Deployment Status]=2,[InStateAndYes],[OutStateAndYes]),IIf([P_Services Deployment Status]=2,[InStateAndNo],[OutStateAndNo]))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top