Complete the code to calculate total sales using CALCULATE.
Total Sales = CALCULATE(SUM(Sales[[1]]))The SUM function sums the Amount column in the Sales table. The CALCULATE function evaluates this expression.
Complete the code to calculate sales filtered by the year 2023.
Sales 2023 = CALCULATE(SUM(Sales[Amount]), Sales[Year] = [1])
The filter inside CALCULATE restricts the data to the year 2023, so only sales from that year are summed.
Fix the error in the code to calculate sales for the 'Electronics' category.
Electronics Sales = CALCULATE(SUM(Sales[Amount]), Sales[Category] = [1])Text values in filters must be enclosed in single quotes in DAX. So, 'Electronics' is correct.
Fill both blanks to calculate total sales for 2023 in the 'Furniture' category.
Furniture Sales 2023 = CALCULATE(SUM(Sales[Amount]), Sales[Year] = [1], Sales[Category] = [2])
The first filter selects the year 2023, and the second filter selects the 'Furniture' category with quotes.
Fill all three blanks to calculate sales for 2023, 'Clothing' category, and region 'West'.
Clothing Sales West 2023 = CALCULATE(SUM(Sales[Amount]), Sales[Year] = [1], Sales[Category] = [2], Sales[Region] = [3])
The filters specify year 2023 (number), category 'Clothing' (text with quotes), and region 'West' (text with quotes).