Forum Discussion
bo_afk
7 years agoPost Patron
Sum by multiple columns
Hi, I have some stock data that shows products sent out and products returned, along with return reasons (row 2,3,4). I also have numbers for those sent out but not returned (row 1). What I ...
- 7 years ago
Cool try this
Percentage = SUM(Com1[Return])/CALCULATE(SUM(Com1[Out]),ALLEXCEPT(Com1,Com1[Cat4]))
Baskar
7 years agoResident Rockstar
Cool try this
Percentage = SUM(Com1[Return])/CALCULATE(SUM(Com1[Out]),ALLEXCEPT(Com1,Com1[Cat4]))
bo_afk
7 years agoPost Patron
Thanks Baskar, this has worked! :smileyvery-happy:
However I made a small change in the "allexcept" part where I included all the cat columns as opposed to just cat4. I assume this allows the correct calculations when grouped by any of the categories. Do correct me if I'm wrong though.