Gross margin measures the sales revenue left after paying the cost of the items sold. In a dashboard, it shows the profit contribution behind sales for a selected product, period, customer group, or location. section 6.1.2 section 6.4.1
Calculate gross margin for any slice of the data by summing its gross margin values. Keep it separate from margin percentage: margin percentage divides total gross margin by total sales and expresses the result as a percentage. section 6.4.1
A three-row calculation
Suppose three rows report sales of $500, $300, and $200, with gross margins of $200, $120, and $80. Total sales are $1,000, while gross margin is $400. The corresponding margin percentage is 40%. section 6.4.1
| Date | Product | State | Sales | Gross Margin | Transactions | |------------|--------------|-------|--------|--------------|--------------| | 2024-01-01 | Fountain Pen | CA | 500 | 200 | 10 | | 2024-01-01 | Notebook | TX | 300 | 120 | 5 | | 2024-01-01 | Pencil | NY | 200 | 80 | 8 |
Use the sample rows to verify that gross margin can be aggregated across products and states before displaying a dashboard total. section 6.4.1
