Dashboard Mode - Basic arithmetic in DAX
Business Question
How much total revenue and profit did each product generate, and what is the average profit per sale?
How much total revenue and profit did each product generate, and what is the average profit per sale?
| Product | Units Sold | Unit Price | Unit Cost |
|---|---|---|---|
| Notebook | 10 | 5 | 3 |
| Pen | 20 | 2 | 1 |
| Eraser | 15 | 1 | 0.5 |
| Marker | 8 | 3 | 1.5 |
| Ruler | 12 | 4 | 2 |
Total Revenue = SUMX(Sales, Sales[Units Sold] * Sales[Unit Price])Total Profit = SUMX(Sales, Sales[Units Sold] * (Sales[Unit Price] - Sales[Unit Cost]))Average Profit per Sale = DIVIDE([Total Profit], SUM(Sales[Units Sold]))Units Sold * Unit PriceUnits Sold * (Unit Price - Unit Cost)+----------------------+----------------------+----------------------+ | Total Revenue KPI | Total Profit KPI | Average Profit per | | | | Sale KPI | +----------------------+----------------------+----------------------+ | Sales Details Table | | | +--------------------------------------------------------------+
A slicer for Product allows filtering all KPIs and the sales details table to show data only for the selected product(s). When a product is selected, the Total Revenue, Total Profit, and Average Profit per Sale update accordingly, and the table shows only rows for that product.
If you add a filter to show only the product Pen, which components update and what are their new values?