# Discussions

View Only

## I am trying to create a new formula for different Deal Types.

• #### 1.  I am trying to create a new formula for different Deal Types.

Posted 05-30-2017 02:03
I am trying to create a new formula for different Deal Types. If Deal Type 1 or Deal Type 2 is selected then one field plus another field- 400. deal type 3 is selected then this field + this field.

If([Deal Type] = "AMG Sampler", ([Down Payment]+[Balance Due]),
If([Deal Type] = "AMG Platinum Advantage",([CS Down Payment]+[CS Balance Due])-400)),
If([Deal Type] = "RCI Points",([Down Payment]+[Balance Due])-948))

• #### 2.  RE: I am trying to create a new formula for different Deal Types.

Top
Contributor
Posted 05-30-2017 11:05
In Quick Base, unlike excel, you do not need to nest your IFs. Also while extra parentheses don't hurt, they really don't help either.

If(
[Deal Type] = "AMG Sampler", [Down Payment]+[Balance Due],
[Deal Type] = "AMG Platinum Advantage",[CS Down Payment]+[CS Balance Due]-400,
[Deal Type] = "RCI Points",[Down Payment]+[Balance Due]-948)

This can also be written with a case function since you are comparing to the same field repeatedly.

Case([Deal Type],
"AMG Sampler", [Down Payment]+[Balance Due],
"AMG Platinum Advantage",[CS Down Payment]+[CS Balance Due]-400,
"RCI Points",[Down Payment]+[Balance Due]-948)

• #### 3.  RE: I am trying to create a new formula for different Deal Types.

Posted 05-30-2017 12:44
Thank you that was perfect.  I should have went to Empower.  Formulas are still tough for me.

• #### 4.  RE: I am trying to create a new formula for different Deal Types.

Posted 06-06-2017 22:38
I am needing to add to this formula.  If I want a specific field to determine the -948 such as Sales Team.  If your on Sales Team A you get
[Deal Type] = "RCI Points",[Down Payment]+[Balance Due]-948)
Sales Team B gets
[Deal Type] = "RCI Points",[Down Payment]+[Balance Due])

• #### 5.  RE: I am trying to create a new formula for different Deal Types.

Posted 06-07-2017 15:26
Thanks that was perfect!

I am needing to add to this formula.  If I want a specific field to determine the -948 such as Sales Team.  If your on Sales Team A you get
[Deal Type] = "RCI Points",[Down Payment]+[Balance Due]-948)
Sales Team B gets
[Deal Type] = "RCI Points",[Down Payment]+[Balance Due])