Skip to main content
Question

Help with formula

  • May 1, 2018
  • 0 replies
  • 23 views

My requirements were the following:

Program = Residential

Measure = M&V and any of these:

M&V_allclean = No

TO_CalculatedCFMPerTon < 340

TO_CalculatedCFMPerTon > 460

If Equipment ? MeteringDevice = TXV and TO_Subcooling > TO_SubcoolingTarget plus 5

If Equipment ? MeteringDevice = TXV and TO_Subcooling < TO_SubcoolingTarget minus 5

If Equipment ? MeteringDevice does not equal TXV and TO_Superheat > TO_TargetSuperHeat plus 5

If Equipment ? MeteringDevice does not equal TXV and TO_Superheat < TO_TargetSuperHeat minus 5

Below is what I came up with and it's not working.

If([Customer - Program]="Residential" and
[Measure]="M&V" and
[M&V_allclean]=false and
[TO_CalculatedCFMPerTon]<340 and
[TO_CalculatedCFMPerTon]>460 and
[Equipment - MeteringDevice]="TXV" and ([TO_Subcooling]>[TO_SubcoolingTarget] + 5 or [TO_Subcooling]<[TO_SubcoolingTarget] - 5) and
[Equipment - MeteringDevice]<>"TXV" and ([TO_Superheat]>[TO_TargetSuperHeat] + 5 or [TO_Superheat]<[TO_TargetSuperHeat] - 5), "140")

Thanks for any assistance.
This topic has been closed for replies.

  • Quickbase Alumni
  • May 1, 2018
Group your conditions in parenthesis.

If( (condition 1) and (condition 2) and (condition 3), true result, false result)

  • Quickbase Alumni
  • May 2, 2018
Hi Stephen
If you make a formula numeric field, the formula editor will help you with the placement of parenthesis. If you write it out your conditions first like 'this AND this AND This OR This' it helps you make sense of all the fields involved:

If(
    ([Customer - Program]="Residential") and 
    ([Measure]="M&V") and 
    ([M&V_allclean]= "false") 
and 
    ([TO_CalculatedCFMPerTon]<340) or ([TO_CalculatedCFMPerTon]>460)
and 
    ([Equipment - MeteringDevice]="TXV") and 
    ([TO_Subcooling] > ([TO_SubcoolingTarget] + 5) or 
    ([TO_Subcooling] < ([TO_SubcoolingTarget] - 5))) 
or
    ([Equipment - MeteringDevice]<>"TXV" ) and 
    ([TO_Superheat] > ([TO_TargetSuperHeat] + 5) or 
    ([TO_Superheat] < ([TO_TargetSuperHeat] - 5))), 140)