Forum Discussion
bo_afk
Post Patron
7 years agoSum 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
Resident Rockstar
7 years agoCool try this
Percentage = SUM(Com1[Return])/CALCULATE(SUM(Com1[Out]),ALLEXCEPT(Com1,Com1[Cat4]))
bo_afk
Post Patron
7 years agoThanks 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.