Description
Adds all numbers in a column. Operates in filter context and ignores blank values and text
Return
Decimal number (scalar)
Status
Done
Syntax
SUM(<column>)
SUM
Syntax:
SUM(<column>)Description: Adds all numbers in a column. Operates in filter context and ignores blank values and text. Only works with numeric columns.
When to Use:
- Calculating total sales, revenue, or quantities
- Summing financial metrics like costs, profits, or discounts
- Any scenario requiring addition of numeric values across rows
Business Scenarios:
- Total sales revenue across all transactions
- Total units sold by product category
- Total discount amounts given to customers
Example 1: Total Sales Amount
Total Sales = SUM(Sales[SalesAmount])Context: Creates a measure that calculates total sales revenue. When placed in a visual with Product[Category], it automatically calculates sales for each category due to filter context.
Example 2: Total Quantity Sold
Total Quantity = SUM(Sales[SalesQuantity])Context: Calculates total units sold. Useful for inventory management and understanding volume metrics separate from revenue.
Key Notes:
- Automatically ignores blanks and non-numeric values
- Works in both calculated columns and measures (preferred in measures)
- Highly optimized by the engine for performance
- Returns BLANK if all values are blank or non-numeric