Dashboard Mode - Aggregate vs row-level calculations
Business Question
How do total sales and average sales per order compare, and how does each order contribute to these totals?
Jump into concepts and practice - no test required
How do total sales and average sales per order compare, and how does each order contribute to these totals?
| Order ID | Customer | Sales Amount |
|---|---|---|
| 1001 | Alice | 150 |
| 1002 | Bob | 200 |
| 1003 | Charlie | 100 |
| 1004 | Diana | 250 |
| 1005 | Eva | 300 |
SUM([Sales Amount])AVG([Sales Amount])[Sales Amount] / SUM([Sales Amount])+----------------------+-------------------------+ | Total Sales (KPI) | Average Sales (KPI) | | [1000] | [200] | +----------------------+-------------------------+ | | | Bar Chart: Sales by Order ID | | | +----------------------------------------------+ | | | Table: Orders with Sales and % of Total Sales| | | +----------------------------------------------+
Adding a filter for Customer name updates the bar chart and table to show only selected customers' orders. The KPI cards recalculate total and average sales for the filtered data.
If you add a filter for Customer = 'Bob', which components update and what are their new values?
SUM([Sales]) / COUNT([Order ID]) return?SUM([Sales] * [Quantity]) in Tableau but it gives an error. What is the likely problem?SUM([Profit]) / COUNTD([Customer ID]) divides total profit (SUM) by distinct customer count (COUNTD), correctly calculating average profit per customer.