P
Phil Smith
Here is the formula:
Expr1: Sum(CDbl(([Items on Selected Prebook-Type
Brand-Count]![SumOfSumOforder_qty]/[Items on Selected Prebook-Brand
Count]![SumOfSumOforder_qty])))
Occasionaly, the field to the right of the divisor is a null, generating
"Invalid use of null."
I tried using:
iff(isnull([Items on Selected Prebook-Brand
Count]![SumOfSumOforder_qty]),0,Sum(CDbl(([Items on Selected
Prebook-Type Brand-Count]![SumOfSumOforder_qty]/[Items on Selected
Prebook-Brand Count]![SumOfSumOforder_qty]))))
But I get "You tried to execute a query that does not include ...as part
of an aggregate.
So I changed it to
sum(iff(isnull([Items on Selected Prebook-Brand
Count]![SumOfSumOforder_qty]),0,Sum(CDbl(([Items on Selected
Prebook-Type Brand-Count]![SumOfSumOforder_qty]/[Items on Selected
Prebook-Brand Count]![SumOfSumOforder_qty])))))
And I get "Cannot have aggregate Function in expression...
In the words of Charlie Brown, "AAAUUUUUGH!"
It seems pretty simple. In the end, all I am trying to do is simple
division.
Expr1: Sum(CDbl(([Items on Selected Prebook-Type
Brand-Count]![SumOfSumOforder_qty]/[Items on Selected Prebook-Brand
Count]![SumOfSumOforder_qty])))
Occasionaly, the field to the right of the divisor is a null, generating
"Invalid use of null."
I tried using:
iff(isnull([Items on Selected Prebook-Brand
Count]![SumOfSumOforder_qty]),0,Sum(CDbl(([Items on Selected
Prebook-Type Brand-Count]![SumOfSumOforder_qty]/[Items on Selected
Prebook-Brand Count]![SumOfSumOforder_qty]))))
But I get "You tried to execute a query that does not include ...as part
of an aggregate.
So I changed it to
sum(iff(isnull([Items on Selected Prebook-Brand
Count]![SumOfSumOforder_qty]),0,Sum(CDbl(([Items on Selected
Prebook-Type Brand-Count]![SumOfSumOforder_qty]/[Items on Selected
Prebook-Brand Count]![SumOfSumOforder_qty])))))
And I get "Cannot have aggregate Function in expression...
In the words of Charlie Brown, "AAAUUUUUGH!"
It seems pretty simple. In the end, all I am trying to do is simple
division.