Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum of a surjective sum

Hi everyone, I would need some help to get the following sum:

Case BON.PNG

Both Eur and Delivery are linked to the key Ship-to:

For a Ship-to, there is a unique Eur (bijective function).

But for a unique Ship-to, there are multiple of Delivery (surjective function).

Ex: Eur (1)*Delivery (1,1) + Eur (1)*Delivery (1,2) +...+Eur(1)*Delivery (1,n) + Eur (2)*Delivery (2,1)+Eur(2)*Delivery (2,2)+...+Eur(2)*Delivery (2,m).


Please find enclosed the excel source & qlikview formula.

Thank you in advance!

Br/Ben

4 Replies
sunny_talwar

May be this:

Sum(Aggr(Sum(M3)*Eur, [Ship-to], Country))


Capture.PNG

Not applicable
Author

Well done, thank you Sunny.

sunny_talwar

In fact you might want to try this also:

Sum(M3*Eur)

Not applicable
Author

Right! thank you again.