Forum Discussion
Rate
7 years agoHelper III
Help SUM by Two columns: Origin and Destination
Hello there! I am having some trouble with something that I believe should be more o less easy, but my DAX is still very basic, so I would love if you could help me! Among other tables, I hav...
- 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
PattemManohar
7 years agoCommunity Champion
Rate Any sample data will be really helpful
- Rate7 years agoHelper III
Hello again,
Of course, I have uploaded an example to Wetransfer. Please, let me know if you need any further clarification.
Thanks dearly!