I have a database that creates a Total Loss Percent (columnT) on counts for adjusting that needs to be a weighted average based on these rules:
if columnT is <5 then = 0%
if columnT is >=90 then = 100%
If either of those scenarios is true then they should not be part of the Weighted Average as well.
Right now I have 3 created fields in the query:
Weight: ([acresCounted]/[Forms]![frmCanolaCounts]![ActualAcres])
SW: (IIf([columnT]<5 Or [columnt]>=90,0,[columnt])*[Weight])
POLAcres: (IIf([columnT]<5 Or [columnt]>=90,0,[acresCounted])) - This is used to determine the number of acres to use to create the Weight where any count that has a Toal loss as per the rules is NOT included.
On the form, in the detail, I have 2 created fields that are CRUCIAL to the formula to work. Everything works great but its just the last problem I can't figure out:
Weight2 - Control Source: =([acresCounted]/(Sum([POLAcres]))) - Used to create the proper weight based on the rules
SW1 - Control Source: =(IIf([columnT]<5 Or [columnt]>=90,0,[columnt])*[Weight2]) - used to create the proper Score x Weight value.
Then in the form header, i have the Weighted Average field to determine the overall weight.
AvgWeight - Control Source: =Sum([SW1])
All in all the key to it working is being able to Sum([SW1]) But it breaks everything when trying to do that. Anyone have any ideas how I can sum ([SW1])???
Thanks for the help, sorry if it comes off a bit confusing.