Skip to main content
Question

Average these only if this

  • May 23, 2019
  • 0 replies
  • 13 views

I need help with this formula.

I need the average of certain numbers for a certain apartment unit, so I currently have this formula:

Average([Appliances],[Bath Cabinets],[Bath Countertops],[Doors],[Flooring],[Demo],[Kitchen Cabinets],[Kitchen Countertops],[Paint],[Door Hardware],[Tub Completion %])

My dilema is that not all apartment units need tubs, so I would like the formula to say if the property is named "Paradise Hills" then the average would only be for certain tasks.

Average([Appliances],[Bath Cabinets],[Bath Countertops],[Doors],[Flooring],[Demo],[Kitchen Cabinets],[Kitchen Countertops],[Paint],[Door Hardware])

Makes sense?

I know I would essentially need to keep changing my formula or adding every project to it but I'm okay with that.  

Please help!  I don't have time to research it on my own this time.
This topic has been closed for replies.

try this

IF([Project Name] <> "Paradise Hills",

Average([Appliances],[Bath Cabinets],[Bath Countertops],[Doors],[Flooring],[Demo],[Kitchen Cabinets],[Kitchen Countertops],[Paint],[Door Hardware],[Tub Completion %]),

Average([Appliances],[Bath Cabinets],[Bath Countertops],[Doors],[Flooring],[Demo],[Kitchen Cabinets],[Kitchen Countertops],[Paint],[Door Hardware])
)

Okay, BRB
Here I go

THAT WORKED!!!  I have a follow up question.  Just in case.  Let's say I have two projects that are different from the rest.  How would i do if project paradise hills 1, average this, if paradise hills 2, average this other, otherwise this.

Here is my attempt:  Is this correct?


IF([Project Name] <> "Paradise Hills1",

Average([Appliances],[Bath Cabinets],[Bath Countertops],[Doors],[Flooring]),

IF([Project Name] <> "Paradise Hills2",

Average([Appliances],[Bath Cabinets],[Bath Countertops],[Doors]),

Average([Appliances],[Bath Cabinets],[Bath Countertops],[Doors],[Flooring],[Demo],[Kitchen Cabinets],[Kitchen Countertops],[Paint],[Door Hardware])
)

Close but too complicated.  You just need 1 IF

IF([Project Name] = "Paradise Hills1",
Average([Appliances],[Bath Cabinets],[Bath Countertops],[Doors],[Flooring]),

[Project Name] =  "Paradise Hills2",
Average([Appliances],[Bath Cabinets],[Bath Countertops],[Doors]),

Average([Appliances],[Bath Cabinets],[Bath Countertops],[Doors],[Flooring],[Demo],[Kitchen Cabinets],[Kitchen Countertops],[Paint],[Door Hardware])
)