Percent of Total
Part of the DAX with CALCULATE section of Coddy's Power BI journey. Lesson 7 of 24.
Share = this bar's value divided by the value with the filter removed.
Category Share = DIVIDE([Revenue], CALCULATE([Revenue], ALL(Products)))Tea made 300 of 1,500: the share is 0.2, or 20%.
The total row shows 100%: its top and bottom are equal.
Challenge
MediumWrite Category Share: each category's Revenue as a share of the revenue of all categories. It is checked for each category and the total.
Try it yourself
Category Share =| Category | Category Share |
|---|---|
| Coffee | |
| Tea | |
| Bakery | |
| Merch | |
| Total |
- Sales
- Revenue
- Total Units
- Customers
- Products
- ProductID
- Product
- Category
- UnitPrice
- UnitCost
- Stores
- Customers
- Dates
- Targets