Forum Discussion
Help SUM by Two columns: Origin and Destination
- Anonymous7 years ago
Hello Rate,
might not be the most elegant solution but have a look at this:
I made two tables with SUMMARIZE in order to group the quantity by origin and destination:
Origin = SUMMARIZE(movimientos_supervisores_azafat,movimientos_supervisores_azafat[Origin],"Origin Quantity",SUM(movimientos_supervisores_azafat[Quantity]))
Recepients = SUMMARIZE(movimientos_supervisores_azafat,movimientos_supervisores_azafat[Destination],"Rec Quantity",SUM(movimientos_supervisores_azafat[Quantity]))
Then I connected the these two tables with your User table via User and Origin/Destination
Finally I made this measure with the substraction:
Quantity by User = SUM(Recepients[Rec Quantity])-SUM(Origin[Origin Quantity])
please let me know if it helped you.
Regards,
Barna
Hello Anonymous
Thank you for the quick response. I have tried your solution, and it seems to work halfway, mostly for my careless explanation in the request. I am also in need of knowing the amount of the specific product (by code or despcription) that is being given by each origin.
Any ideas on how to include this into your solution?
Thanks a lot!!
Hello again,
I started playing around with your solution and just added a new column for the Code and that made it.
Origin = SUMMARIZE(movimientos_supervisores_azafat,movimientos_supervisores_azafat[Origin],movimientos_supervisores_azafat[Codigo],"Origin Quantity",SUM(movimientos_supervisores_azafat[Quantity]))
Thanks a lot for your help!! As usual, better done than perfect!
Really grafetul Anonymous