| Order | Sales | Profit | Order margin |
|---|---|---|---|
| A | $900 | $90 | 10% |
| B | $100 | −$50 | −50% |
Write down your calculation, then compare your answer with a partner.
| Order | Sales | Profit | Order margin |
|---|---|---|---|
| A | $900 | $90 | 10% |
| B | $100 | −$50 | −50% |
Overall business margin
SUM([Profit]) / SUM([Sales])
Mean order-level margin
AVG([Profit] / [Sales])
Which business question does each calculation answer?
ProfitMarginAgg
SUM([Profit])/SUM([Sales])
Overall profit margin in each subcategory
ProfitMarginRow
[Profit]/[Sales]
Avg Profit margin PER order in each sub-category
| Sub-Category | ProfitMarginAgg | Avg. ProfitMarginRow |
|---|---|---|
| Accessories | 0.2505 | 0.2182 |
| Appliances | 0.1694 | -0.1490 |
| Art | 0.2405 | 0.2522 |
| Binders | 0.1516 | -0.1946 |
| Bookcases | -0.0315 | -0.1351 |
| Chairs | 0.0811 | 0.0471 |
| Copiers | 0.3721 | 0.3204 |
| Envelopes | 0.4228 | 0.4235 |
| Fasteners | 0.2846 | 0.3063 |
| Furnishings | 0.1453 | 0.1398 |
| Labels | 0.4390 | 0.4246 |
| Machines | 0.0182 | -0.0689 |
| Paper | 0.4339 | 0.4250 |
| Phones | 0.1358 | 0.1225 |
| Storage | 0.0948 | 0.0908 |
| Supplies | -0.0251 | 0.1144 |
| Tables | -0.0853 | -0.1402 |
Avg profit margin per order
Row-level calculation and then aggregation
Profit margin per subcategory
Aggregate-level calculation
With [Sub-Category] in the view:
Average manufacturer profit margin
AVG(
{ INCLUDE [Manufacturer] :
SUM([Profit]) / SUM([Sales])
}
)
INCLUDE calculates a margin for each manufacturer; AVG averages those margins.
FIXED [Dim1] [Dim2]
GROUP_BY({Dim1, Dim2})INCLUDE [Dim 2]
GROUP_BY({LOD of Viz} + {Dim2})EXCLUDE [Dim 2]
GROUP_BY({LOD of Viz} - {Dim2})