1 of 1 people found this helpful
sum(a*b)/Sum(a- (if isnull(B) then a else 0 end))
That works perfectly, thanks a lot Khalid!
Eliran -- I took the liberty of marking Khalid's reply as "Correct Answer". Usually the person who starts a thread should do that on the reply that solves the question. Marking a response "correct" lets other participant who are searching for similar answers know where a potential solution can be found.
To mark a response as correct, click the "Correct answer" button in the lower left corner of the response that solved the issue.
Understood. Will do that next time.