Skip to main content
Question

Daisy If statements

  • May 22, 2020
  • 0 replies
  • 25 views

Forum|alt.badge.img+6
How do I get these two if statements in to a numeric formula? I am getting errors when I insert just like below.

If([Total Gross Billed Amount: BoM Ordered]>[BoM Ordered Amount]and [Total Gross Billed Amount: BoM Ordered]=0,0,[Gross BoM Ordered Balance]*0.5)

If([Total Gross Billed Amount: BoM Ordered]>[BoM Ordered Amount]and [Total Gross Billed Amount: BoM Ordered]>0,0,[Gross BoM Ordered Balance]) 


------------------------------
GWB
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+22
  • Quickbase Alumni
  • May 22, 2020
In general, you start with in IF and then then just list the tests in the order you want them evaluated.  The first one that is TRUE wins!
But I am unable to understand the business logic that you are looking for.  Can you say it in words?

------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------

  • Quickbase Alumni
  • May 22, 2020


George,

If(
  [Total Gross Billed Amount: BoM Ordered]=0,
  0,
[Gross BoM Ordered Balance]*0.5)

if(
  [Total Gross Billed Amount: BoM Ordered]>0,
  0,
  [Gross BoM Ordered Balance]) ​


You've got these two statements in there which contradict one another.

Let's examine what would happen if BoM Ordered was 1, 0, or -1.

If BoM ordered is  1, the first statement would return '[Gross BoM Ordered Balance]*.5' and the second would return 0.

If BoM ordered is  0, the first statement would return 0 and the second would return [Gross BoM Ordered Balance].

If BoM ordered is -1, the first statement would return '[Gross BoM Ordered Balance]*.5' and the second would return 0.

So these are incompatible, if you want them to return in the same statement. If you can tell me what the formula should return for BoM ordered being 1, 0, and -1, the formula can be combined.

If you need more help with it, swing by Data Collaborative's free Office Hours, every Thursday at 1pm Eastern.

Sign up here:
https://data.quickbase.com/db/bqeqqj33i






------------------------------
- Sam

______________________________________________
Sam Jones
Vice President, Product and Technology
he/him

The Data Collaborative, Inc.
sjones@datacollaborative.com
366 Massachusetts Ave, Suite 203 | Arlington, MA 02474
------------------------------

Forum|alt.badge.img+6
Basically each of the IF's in the formula alone provide correct results for some records but not all records. Somehow I have to write one formula that accounts for both situations.

------------------------------
George George
------------------------------