Forum Discussion
Power Bi Matrix to sum margin within each row
Hello,
sorry wasn't very sure how to word it, but I am trying to do a different type of sum where I am looking at Total Gross Revenue vs Direct Margin by a category:
So I have this:
As you can see there are these types and it has two categories, one being Total Gross Revenue and the other direct margin. Having them sum up by each category is very easy, but what I am trying to do next is do %'s, I want to show Direct Margin / Total Gross Revenue, but when I do ALL() or ALLSELECTED it is not breaking it out by category but instead summing up the entire business making the %'s very low.
What am trying to achieve is when I select a slicer for % or $ it will do a switch, doing ALLSELECTED and dividing that by the "Total Gross Revenue" works perfectly but when I break it down by more categories it is summing up the whole business as opposed to just summing up that product type.
Is there some step that I potentially am missing or some dax code that may help me dynamically sum margin by category?
Thank you!
1 Reply
- Ritaf1983Super User
Hi mattwoldt
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523